]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug in glsl surface shader setup code which was breaking fog
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 16 Apr 2006 09:30:21 +0000 (09:30 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 16 Apr 2006 09:30:21 +0000 (09:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6293 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 44bf341ae8f6b90f797f0b98f2960fd5f8ced637..a81e4305a0321105bb368d49d42efb30d88c69cf 100644 (file)
@@ -953,11 +953,11 @@ void R_SetupSurfaceShader(const entity_render_t *ent, const texture_t *texture,
        if (r_glsl_permutation->loc_Texture_Color >= 0) R_Mesh_TexBind(1, R_GetTexture(texture->basetexture));
        if (r_glsl_permutation->loc_Texture_Gloss >= 0) R_Mesh_TexBind(2, R_GetTexture(texture->glosstexture));
        //if (r_glsl_permutation->loc_Texture_Cube >= 0 && permutation & SHADERPERMUTATION_MODE_LIGHTSOURCE) R_Mesh_TexBindCubeMap(3, R_GetTexture(r_shadow_rtlight->currentcubemap));
-       //if (r_glsl_permutation->loc_Texture_FogMask >= 0) R_Mesh_TexBind(4, R_GetTexture(r_texture_fogattenuation));
+       if (r_glsl_permutation->loc_Texture_FogMask >= 0) R_Mesh_TexBind(4, R_GetTexture(r_texture_fogattenuation));
        if (r_glsl_permutation->loc_Texture_Pants >= 0) R_Mesh_TexBind(5, R_GetTexture(texture->skin.pants));
        if (r_glsl_permutation->loc_Texture_Shirt >= 0) R_Mesh_TexBind(6, R_GetTexture(texture->skin.shirt));
-       //if (r_glsl_permutation->loc_Texture_Lightmap >= 0) R_Mesh_TexBind(7, R_GetTexture(r_texture_white));
-       //if (r_glsl_permutation->loc_Texture_Deluxemap >= 0) R_Mesh_TexBind(8, R_GetTexture(r_texture_blanknormalmap));
+       if (r_glsl_permutation->loc_Texture_Lightmap >= 0) R_Mesh_TexBind(7, R_GetTexture(r_texture_white));
+       if (r_glsl_permutation->loc_Texture_Deluxemap >= 0) R_Mesh_TexBind(8, R_GetTexture(r_texture_blanknormalmap));
        if (r_glsl_permutation->loc_Texture_Glow >= 0) R_Mesh_TexBind(9, R_GetTexture(texture->skin.glow));
        if (r_glsl_permutation->loc_FogColor >= 0)
        {