From: havoc Date: Thu, 22 Feb 2007 11:29:38 +0000 (+0000) Subject: don't compute tangents or normals on non-deluxemapped world surfaces, or tangents... X-Git-Tag: xonotic-v0.1.0preview~3522 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=86f4eb9b9dac288780f2297b63b6e7a9e0989c27;p=xonotic%2Fdarkplaces.git 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 --- 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);