From 86f4eb9b9dac288780f2297b63b6e7a9e0989c27 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 22 Feb 2007 11:29:38 +0000 Subject: [PATCH] don't compute tangents or normals on non-deluxemapped world surfaces, or tangents on models if the shader does not use normalmapping git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6894 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index a2e4b418..eb72ccb4 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -3446,13 +3446,13 @@ static void R_DrawTextureSurfaceList_GL20(int texturenumsurfaces, msurface_t **t } R_SetupSurfaceShader(vec3_origin, rsurface_lightmode == 2); - //permutation_deluxemapping = permutation_lightmapping = R_SetupSurfaceShader(vec3_origin, rsurface_lightmode == 2, false); - //if (r_glsl_deluxemapping.integer) - // permutation_deluxemapping = R_SetupSurfaceShader(vec3_origin, rsurface_lightmode == 2, true); if (!r_glsl_permutation) return; - RSurf_PrepareVerticesForBatch(true, true, texturenumsurfaces, texturesurfacelist); + if (rsurface_lightmode == 2) + RSurf_PrepareVerticesForBatch(true, r_glsl_permutation->loc_Texture_Normal, texturenumsurfaces, texturesurfacelist); + else + RSurf_PrepareVerticesForBatch(r_glsl_permutation->loc_Texture_Normal, r_glsl_permutation->loc_Texture_Normal, texturenumsurfaces, texturesurfacelist); R_Mesh_TexCoordPointer(0, 2, rsurface_model->surfmesh.data_texcoordtexture2f); R_Mesh_TexCoordPointer(1, 3, rsurface_svector3f); R_Mesh_TexCoordPointer(2, 3, rsurface_tvector3f); -- 2.39.2