Fog based on Distance, not Depth

In ROBLOX, fog thickness is currently based on depth in the screen, rather than distance to the camera. This can make things look pretty ugly. Fog would work significantly better with this in place.

Here are pictures illustrating the problem. Fog begins at 99 studs and ends at 100 studs.

Here I am looking at this structure: It is not visible through the fog.

I turn 45 degrees left without moving, and now the structure is entirely visible.

Fog represents particles blocking your vision – it doesn’t make sense for fog to change when you turn. This is very problematic for fog which is close to the player.

Fog should be based on distance, not depth.

Duplicate thread

have fun all those square roots.

local startdist
local enddist
local shadeamount=((x*x+y*y+z*z)^0.5-startdist)/(enddist-startdist)

Yeah, I’ve been wanting to change to range fog for ages. I’ll try to find some time to look into it.

1 Like