]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix fog for GL_SRC_ALPHA GL_ONE
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Mar 2011 17:36:37 +0000 (17:36 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Mar 2011 17:36:37 +0000 (17:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10899 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 8566fd47da12d50662342be4b1348ae7142f017e..5aed6a0554efb3242d0ed620d2e0496d45d91cb7 100644 (file)
@@ -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)