From 3abe61e54d3861468ae4463052b87f5f44cc103f Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 22 Dec 2007 17:16:34 +0000 Subject: [PATCH] forgot to add fog_start to the fog range... now it behaves right git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7843 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index ee6ceb4b..6bb35d72 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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 -- 2.39.2