Fog Factor computation
‘f’ must be computed on a per-fragment basis
Three equations for ‘f’
- GL_LINEAR: f = (fog.end - Z)/(fog.end-fog.start)
- GL_EXP: f = e -(density * Z)
- GL_EXP2: f = e -(density*Z)2
I740 only supports GL_LINEAR for acceleration
Per Fragment Computation cost of ‘f’ is 1 multiplication and 1 subtraction since 1/(fog.end-fog.start) can be precomputed as a multiplying factor for all fragments.