From: divverent Date: Sun, 6 Mar 2011 17:36:37 +0000 (+0000) Subject: fix fog for GL_SRC_ALPHA GL_ONE X-Git-Tag: xonotic-v0.5.0~425^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=15c45f623a8fdd9117f6eebebb0b335467de40ea;p=xonotic%2Fdarkplaces.git fix fog for GL_SRC_ALPHA GL_ONE git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10899 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 8566fd47..5aed6a05 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -2539,6 +2539,8 @@ void R_SetupShader_Surface(const vec3_t lightcolorbase, qboolean modellighting, } if(!allow_colormod) colormod = dummy_colormod; + if(rsurface.texture->currentmaterialflags & MATERIALFLAG_ADD) + allow_fog = allow_colormod; // we actually implement fog by colormodding with a color (f,f,f) for some f if(!allow_fog) permutation &= ~(SHADERPERMUTATION_FOGHEIGHTTEXTURE | SHADERPERMUTATION_FOGOUTSIDE | SHADERPERMUTATION_FOGINSIDE); switch(vid.renderpath)