How distance fog thickens with depth, the distance in front of the camera
'linear'
smoothstep(near, far, depth)
near
far
'exponential'
1 - exp(-density * depth)
'exp2'
1 - exp(-(density * depth)²)
new View3D({ width, height, fog: { type: 'exponential', color: 0xadb2ba, density: 0.18 } }); Copy
new View3D({ width, height, fog: { type: 'exponential', color: 0xadb2ba, density: 0.18 } });
How distance fog thickens with depth, the distance in front of the camera
'linear':smoothstep(near, far, depth), from no fog atnearto full fog atfar.'exponential':1 - exp(-density * depth). A soft haze that starts right at the camera.'exp2':1 - exp(-(density * depth)²). Clear near the camera, then closing in.