]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug with rtlights on vertex texture blend surfaces (such as in
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 May 2008 22:55:54 +0000 (22:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 May 2008 22:55:54 +0000 (22:55 +0000)
pom.bsp) that was causing them to white out

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8277 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index e3de2afb8a2a14b42a2f82a1bd644a4e27587809..eb324479059227440d6cc95f9f1fa0fbeaf2c0c3 100644 (file)
@@ -1550,8 +1550,11 @@ static void R_Shadow_RenderLighting_Light_GLSL(int firstvertex, int numvertices,
        }
        //R_Mesh_TexBindCubeMap(GL20TU_CUBE, R_GetTexture(rsurface.rtlight->currentcubemap));
        R_Mesh_TexBind(GL20TU_FOGMASK, R_GetTexture(r_texture_fogattenuation));
-       R_Mesh_TexBind(GL20TU_PANTS, R_GetTexture(rsurface.texture->currentskinframe->pants));
-       R_Mesh_TexBind(GL20TU_SHIRT, R_GetTexture(rsurface.texture->currentskinframe->shirt));
+       if(rsurface.texture->colormapping)
+       {
+               R_Mesh_TexBind(GL20TU_PANTS, R_GetTexture(rsurface.texture->currentskinframe->pants));
+               R_Mesh_TexBind(GL20TU_SHIRT, R_GetTexture(rsurface.texture->currentskinframe->shirt));
+       }
        R_Mesh_TexBind(GL20TU_ATTENUATION, R_GetTexture(r_shadow_attenuationgradienttexture));
        R_Mesh_TexCoordPointer(0, 2, rsurface.texcoordtexture2f, rsurface.texcoordtexture2f_bufferobject, rsurface.texcoordtexture2f_bufferoffset);
        R_Mesh_TexCoordPointer(1, 3, rsurface.svector3f, rsurface.svector3f_bufferobject, rsurface.svector3f_bufferoffset);