From 5a53c701a5077ca09e5ffa4d07090bc7b818b269 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 23 Dec 2007 17:08:21 +0000 Subject: [PATCH] fix remaining fog bug with fixed function, r_view.colorscale != 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7847 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index c9f0c207..e6a92360 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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); } } } -- 2.39.2