The front and back fog distances are defined in the local coordinate system of the node, but the actual fog equation will ideally take place in eye coordinates.
The linear fog blending factor, f
, is computed as follows:
f = (backDistance - z) / (backDistance - frontDistance)
z
is the distance from the viewpoint.frontDistance
is the distance at which fog starts obscuring objects.backDistance
is the distance at which fog totally obscurs objects.
|
|
|
|
|
|