CarlosMartinNieto

Carlos Martín Nieto

Hardware

nVidia Corporation NV35 [GeForce FX 5900] (rev a1) PCIID 10de:0331

Contact

IRC nick: cmn
E-Mail: carlos@cmartin.tk
Homepage: http://www.cmartin.tk

Fog

These formulas work for me in my NV35. They are not affected by the hints (glHint()) at least on my NV36

          -1.0
f = -------------------
    fog_end - fog_start

        fog_start
c = ------------------- + 2.001953
    fog_end - fog_start

f = -0.090168 * fog_density
c = -1.5

f = -0.212330 * fog_density
c = -1.5

Note that f here is the NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR command/register and c is the NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT one. NV30_TCL_PRMIMITIVE_3D_FOG_EQUATION_QUADRATIC is always 0.

It seems that at least on NV20, the formulas are slightly different.

glxgears


CategoryHomepage