From f30fdef69553c51c162cf4d98aaad5494915d6f8 Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 7 Jun 2009 13:07:04 +0000 Subject: [PATCH] Don't go through multiple lighting passes when rendering the shadow maps. git-svn-id: https://svn.eduke32.com/eduke32@1416 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 7e3bfeb42..af1b368e5 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -1062,7 +1062,7 @@ void polymer_drawsprite(int32_t snum) curpriority = 0; - while (curpriority < pr_maxlightpriority) + while ((curpriority < pr_maxlightpriority) && (!depth || mirrors[depth-1].plane)) { i = j = 0; while (j < lightcount) @@ -1578,7 +1578,7 @@ static void polymer_drawplane(_prplane* plane) prlights[plane->lights[curlight]].flags.isinview = 1; curlight++; - } while ((curlight < plane->lightcount) && (curlight < pr_maxlightpasses)); + } while ((curlight < plane->lightcount) && (curlight < pr_maxlightpasses) && (!depth || mirrors[depth-1].plane)); if (plane->vbo && (pr_vbos > 0)) { @@ -3275,7 +3275,7 @@ static void polymer_drawmdsprite(spritetype *tspr) curpriority = 0; // light culling - if (lightcount) + if (lightcount && (!depth || mirrors[depth-1].plane)) { sradius = (m->head.frames[m->cframe].r * (1 - m->interpol)) + (m->head.frames[m->nframe].r * m->interpol);