Fog is light scattered between the camera and the subject. Every pixel in a foggy photo is a mix of the thing behind it and the fog’s own light, and the mix depends on how far away the thing is. The effect models exactly that, with one honest gap: a photo carries no distance, so the distance is drawn in from the controls and a reading of the picture.
Horizon and reach
The Horizon slider is where the far edge of the scene sits, as a share of the height from the top. Aerial haze is thickest there and everything above it, the sky, is treated as far. Reach sets how far forward the haze comes from that line: at a low value only the distance goes soft, at a high value it reaches the bottom of the frame.
Ground fog uses the same two sliders the other way round. Horizon becomes the top of the fog layer, and Reach is how quickly it thickens below that line. A low reach gives a thin sheet lying on a field; a high one buries the foreground.
Scene depth
A dehaze filter estimates distance from the dark channel, the minimum of the three colour channels over a patch, because haze adds light and a far object is never fully dark. Scene depth runs that estimate here and uses it to thin the fog over areas that read as near. A dark tree in front of a bright field keeps its edge, and the field fogs behind it.
It is an estimate. A dark hillside at the far end of the valley also reads as near and stays clearer than it should. When that happens, lower the slider, or set it to 0 and let the ramp alone decide.
Density, wisps and colour
Density is the extinction at full distance. At the default a horizon is visibly softened but still readable; at 100 only a trace of the far scene survives. Wisps modulate the density with two scales of noise stretched horizontally, so the fog forms banks rather than a flat wash. Fog colour is the colour of the scattered light: the cool white of overcast is the default, and a warm grey suits late sun or smoke.
Softening
Fog does not only add light. It scatters the light that reaches the camera, so detail behind thick fog goes soft. The effect blends the scene toward a blurred copy in proportion to the fog in front of it, which is most of what separates fog from a tinted gradient.
Example: a street at dusk
A street photographed straight down its length has the far end near the middle of the frame. Set Horizon to around 45, leave Aerial haze selected, and raise Density until the buildings at the end go pale. Scene depth at 40 keeps the parked cars in the foreground dark and sharp. If the sky looks flat, lower Reach so the haze gathers at the far end instead of everywhere.
Where it stops
The ramp is a straight horizon with one direction of depth. A scene with objects at several distances across the frame, or a horizon that is not level, will fog in the wrong places, and Scene depth can only partly correct that. Fog that curls around a subject, or a light source glowing through it, needs a picture with real depth information that this one does not have.