From 67c5bcfd320536354506b9898f3e9d36481aee10 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 16 May 2012 07:44:52 +0000 Subject: [PATCH] fix alphatest surfaces in GL11 path git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11819 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=d76bc3d30f1b197c6f1260875d7bed34f0655e36 --- gl_rmain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index ec47acce..62222a73 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -10021,7 +10021,7 @@ static void R_DrawTextureSurfaceList_GL11(int texturenumsurfaces, const msurface switch (layer->type) { case TEXTURELAYERTYPE_LITTEXTURE: - if (layer->blendfunc1 == GL_ONE && layer->blendfunc2 == GL_ZERO) + if (layer->blendfunc1 == GL_ONE && layer->blendfunc2 == GL_ZERO && !(rsurface.texture->currentmaterialflags & MATERIALFLAG_ALPHATEST)) { // two-pass lit texture with 2x rgbscale // first the lightmap pass @@ -10054,6 +10054,8 @@ static void R_DrawTextureSurfaceList_GL11(int texturenumsurfaces, const msurface R_Mesh_TexCoordPointer(0, 2, GL_FLOAT, sizeof(float[2]), rsurface.batchtexcoordtexture2f, rsurface.batchtexcoordtexture2f_vertexbuffer, rsurface.batchtexcoordtexture2f_bufferoffset); if (rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT) RSurf_DrawBatch_GL11_VertexShade(layer->color[0], layer->color[1], layer->color[2], layer->color[3], layer->color[0] != 1 || layer->color[1] != 1 || layer->color[2] != 1 || layer->color[3] != 1, applyfog); + else if (FAKELIGHT_ENABLED) + RSurf_DrawBatch_GL11_FakeLight(layer->color[0], layer->color[1], layer->color[2], layer->color[3], layer->color[0] != 1 || layer->color[1] != 1 || layer->color[2] != 1 || layer->color[3] != 1, applyfog); else RSurf_DrawBatch_GL11_VertexColor(layer->color[0], layer->color[1], layer->color[2], layer->color[3], layer->color[0] != 1 || layer->color[1] != 1 || layer->color[2] != 1 || layer->color[3] != 1, applyfog); } -- 2.39.2