]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
forgot to add fog_start to the fog range... now it behaves right
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Dec 2007 17:16:34 +0000 (17:16 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Dec 2007 17:16:34 +0000 (17:16 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7843 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index ee6ceb4bad2a4b77e246659dc557600675e4433d..6bb35d728b458f1674223c28efaa22ee7e16f780 100644 (file)
@@ -3281,7 +3281,7 @@ void R_UpdateVariables(void)
                // this is the point where the fog reaches 0.9986 alpha, which we
                // consider a good enough cutoff point for the texture
                // (0.9986 * 256 == 255.6)
-               r_refdef.fogrange = 16 / (r_refdef.fog_density * r_refdef.fog_density);
+               r_refdef.fogrange = 16 / (r_refdef.fog_density * r_refdef.fog_density) + r_refdef.fog_start;
                r_refdef.fograngerecip = 1.0f / r_refdef.fogrange;
                r_refdef.fogmasktabledistmultiplier = FOGMASKTABLEWIDTH * r_refdef.fograngerecip;
                // fog color was already set