From 9995e243c1af378170518a1308f24dc66094f1e1 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 6 Nov 2009 12:52:06 +0000 Subject: [PATCH] use larger batches for shadowmaps git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9435 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rsurf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_rsurf.c b/gl_rsurf.c index c48add3d..39e51aec 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1084,7 +1084,7 @@ void R_Q1BSP_CompileShadowMap(entity_render_t *ent, vec3_t relativelightorigin, void R_Q1BSP_DrawShadowMap(int side, entity_render_t *ent, const vec3_t relativelightorigin, const vec3_t relativelightdirection, float lightradius, int modelnumsurfaces, const int *modelsurfacelist, const unsigned char *surfacesides, const vec3_t lightmins, const vec3_t lightmaxs) { dp_model_t *model = ent->model; - msurface_t *surface, *batch[64]; + msurface_t *surface, *batch[1024]; int modelsurfacelistindex, batchsize; // check the box in modelspace, it was already checked in worldspace if (!BoxesOverlap(model->normalmins, model->normalmaxs, lightmins, lightmaxs)) @@ -1103,7 +1103,7 @@ void R_Q1BSP_DrawShadowMap(int side, entity_render_t *ent, const vec3_t relative r_refdef.stats.lights_dynamicshadowtriangles += surface->num_triangles; r_refdef.stats.lights_shadowtriangles += surface->num_triangles; batch[0] = surface; - batchsize = 1; + batchsize = 1; while(++modelsurfacelistindex < modelnumsurfaces && batchsize < (int)(sizeof(batch)/sizeof(batch[0]))) { surface = model->data_surfaces + modelsurfacelist[modelsurfacelistindex]; -- 2.39.2