The BRDF of a cloud
The phase function
When light hits a surface, a BRDF says which outgoing directions are likely. When light hits a particle, a phase function does exactly the same job — it is a probability distribution over directions, and its whole shape is usually controlled by a single number g. Drag g from −1 to 1 and watch the lobe swing from backwards to forwards, then move the sun behind the cloud and see what forward scattering does to its edge.
Ray marched, one scattering event per sample, with the light’s own path through the medium attenuated as well. Put the sun behind the puff and push g up.
—
The lobe is drawn around a single scattering event. Light arrives along the arrow; the curve says how much of it leaves in each direction. Because it is a probability density over the sphere of directions, the whole thing must integrate to one — so making the forward peak taller necessarily makes everywhere else dimmer, which is why a high‑g cloud is brilliant when backlit and flat and grey when lit from the front.
In‑scattering asks: of all the light arriving at this point from every direction, how much gets turned toward the eye? That is an integral over the sphere, weighted by the phase function — structurally identical to the reflection integral in the rendering equation, with fp where the BRDF used to be.
In practice almost nobody evaluates that integral properly. The usual approximation, and the one this panel uses, is to consider light arriving from the light sources only — single scattering — which is why real cloud renderers add extra passes to fake the multiple scattering that makes a thick cloud glow from within.
g = 0.8 or so, which is the setting where the puff opposite starts behaving like weather.