BUG: camera fog

the camera fog seems to be working off of world-space z-depth for objects, not camera-space. so if the camera pivots on the y-axis, fog oscillates between looking correct, and being at 100% far all the time.

while not usually so important, a project we’re working on has a sparse landscape aesthetic, and it’s really difficult to dial in the horizon line area without fog.

It seems to be working as expected in this example I’ve created. I tried using both Linear and Exponential fog. You can use the slider called rotate to spin the camera on its y-axis and view 4 tori located around the camera. I think this demonstrates that the fog is calculated from the camera’s perspective.

Check the Alpha parameter in the fog, if this is set to 1, then background areas without geometry beyond the ‘far’ plane will appear opaque and the same as objects beyond the far plane. Setting Alpha to 0 will have the opposite effect, any background area without geometry will appear to have no fog.

In the example attached, play with the Alpha parameter and see if the behavior is closer to what you expected.

fogtest.4.toe (8.8 KB)

Can you let me know if Ben’s explanation solves things for you?