OpenGL’s Built-inFog Model
Assumptions
- Uniform fog color (“color” of the atmosphere)
- Uniform fog density throughout scene
- Fog is essentially a weighted blend C = f Cr + (1 - f) Cfwhere Cr = pre-fog fragment color, Cf = uniform fog color, and f = fog factor
- Fog factor computed per-fragment based oneye-distance of given fragment