]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
the formula for fog was right... note that it uses the unsimplified formula, as preca...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Dec 2007 21:17:50 +0000 (21:17 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Dec 2007 21:17:50 +0000 (21:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7853 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 18cf387c0bfceee22e42288415916cc1f33b798e..45134017ea8b23487b385ed020b2eb25cb8bfb65 100644 (file)
@@ -3248,6 +3248,7 @@ void R_UpdateFogColor(void) // needs to be called before HDR subrender too, as t
                        vec3_t fogvec;
                        VectorCopy(r_refdef.fogcolor, fogvec);
                        //   color.rgb *= SceneBrightness;
+                       VectorScale(fogvec, r_view.colorscale, fogvec);
                        if(r_glsl.integer && (r_glsl_contrastboost.value > 1 || r_glsl_contrastboost.value < 0)) // need to support contrast boost
                        {
                                //   color.rgb *= ContrastBoost / ((ContrastBoost - 1) * color.rgb + 1);
@@ -3255,7 +3256,6 @@ void R_UpdateFogColor(void) // needs to be called before HDR subrender too, as t
                                fogvec[1] *= r_glsl_contrastboost.value / ((r_glsl_contrastboost.value - 1) * fogvec[1] + 1);
                                fogvec[2] *= r_glsl_contrastboost.value / ((r_glsl_contrastboost.value - 1) * fogvec[2] + 1);
                        }
-                       VectorScale(fogvec, r_view.colorscale, fogvec);
                        r_refdef.fogcolor[0] = bound(0.0f, fogvec[0], 1.0f);
                        r_refdef.fogcolor[1] = bound(0.0f, fogvec[1], 1.0f);
                        r_refdef.fogcolor[2] = bound(0.0f, fogvec[2], 1.0f);