]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix remaining fog bug with fixed function, r_view.colorscale != 0
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Dec 2007 17:08:21 +0000 (17:08 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Dec 2007 17:08:21 +0000 (17:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7847 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index c9f0c2071ab04932919321240a6c569ffbd69748..e6a92360f9b47125825185ac08268743ec963aba 100644 (file)
@@ -3321,7 +3321,7 @@ void R_UpdateVariables(void)
        r_refdef.fog_start = max(0, r_refdef.fog_start);
        r_refdef.fog_end = max(r_refdef.fog_start + 0.01, r_refdef.fog_end);
 
-       R_UpdateFogColor();
+       // R_UpdateFogColor(); // why? R_RenderScene does it anyway
 
        if (r_refdef.fog_density)
        {
@@ -4314,7 +4314,7 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
                                        // were darkened by fog already, and we should not add fog color
                                        // (because the background was not darkened, there is no fog color
                                        // that was lost behind it).
-                                       R_Texture_AddLayer(t, false, GL_SRC_ALPHA, (t->currentmaterialflags & MATERIALFLAG_BLENDED) ? GL_ONE : GL_ONE_MINUS_SRC_ALPHA, TEXTURELAYERTYPE_FOG, t->currentskinframe->fog, &identitymatrix, r_refdef.fogcolor[0], r_refdef.fogcolor[1], r_refdef.fogcolor[2], t->currentalpha);
+                                       R_Texture_AddLayer(t, false, GL_SRC_ALPHA, (t->currentmaterialflags & MATERIALFLAG_BLENDED) ? GL_ONE : GL_ONE_MINUS_SRC_ALPHA, TEXTURELAYERTYPE_FOG, t->currentskinframe->fog, &identitymatrix, r_refdef.fogcolor[0] / r_view.colorscale, r_refdef.fogcolor[1] / r_view.colorscale, r_refdef.fogcolor[2] / r_view.colorscale, t->currentalpha);
                                }
                        }
                }