Comments and answers for "In what units is fog density expressed?"
http://answers.unity.com/questions/8800/in-what-units-is-fog-density-expressed.html
The latest comments and answers for the question "In what units is fog density expressed?"Answer by Matthew A
http://answers.unity.com/answers/425156/view.html
I imagine these are the same as the old fixed function OpenGL pipeline, which I believe are as follows:
<pre>
Linear: f = inverse_lerp(fog_start_distance, fog_end_distance, distance)
Exp: f = exp(-fog_density * distance)
Exp2: f = exp(-(fog_density * distance) ^ 2)
f = clamp(f, 0.0, 1.0)
C = f * Cr + (1.0 - f) * Cf
where:
f is fog factor
C is resulting fragment color
Cr is original fragment color
Cf is fog color
</pre>Tue, 26 Mar 2013 14:42:26 GMTMatthew A