From 3e2531a30de55e9b77ad90931f865b14a3ccb89c Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 29 Sep 2010 07:23:15 +0000 Subject: [PATCH] depthonly, prepass: do not compare lightmap texture for batching (less meshes) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10507 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 bcdadb5e..8d60afd8 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -13025,7 +13025,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in ; continue; } - if(FAKELIGHT_ENABLED) + if(FAKELIGHT_ENABLED || depthonly || prepass) { rsurface.lightmaptexture = NULL; rsurface.deluxemaptexture = NULL; @@ -13038,7 +13038,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in { rsurface.lightmaptexture = surfacelist[i]->lightmaptexture; rsurface.deluxemaptexture = surfacelist[i]->deluxemaptexture; - rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL && !depthonly && !prepass; + rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL; // simply scan ahead until we find a different texture or lightmap state for (;j < numsurfaces && texture == surfacelist[j]->texture && rsurface.lightmaptexture == surfacelist[j]->lightmaptexture;j++) ; @@ -13101,7 +13101,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa ; continue; } - if(FAKELIGHT_ENABLED) + if(FAKELIGHT_ENABLED || depthonly || prepass) { rsurface.lightmaptexture = NULL; rsurface.deluxemaptexture = NULL; @@ -13114,7 +13114,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa { rsurface.lightmaptexture = surfacelist[i]->lightmaptexture; rsurface.deluxemaptexture = surfacelist[i]->deluxemaptexture; - rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL && !depthonly && !prepass; + rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL; // simply scan ahead until we find a different texture or lightmap state for (;j < numsurfaces && texture == surfacelist[j]->texture && rsurface.lightmaptexture == surfacelist[j]->lightmaptexture;j++) ; -- 2.39.2