From 4e69914cb203a04fd947a7b50edc7173df5c0cc6 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 20 May 2016 02:18:14 -0600 Subject: [PATCH] light: skip dirt on bouncedebug --- light/ltface.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/light/ltface.c b/light/ltface.c index bf694d7b..7010a789 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -1652,9 +1652,13 @@ LightFace_Bounce(const bsp2_t *bsp, const bsp2_dface_t *face, const lightsurf_t if (!TestLight(vpl->pos, lightsurf->points[i], NULL)) continue; - /* Use dirt scaling on the indirect lighting. */ - const vec_t dirtscale = Dirt_GetScaleFactor(lightsurf->occlusion[i], NULL, lightsurf); - VectorScale(indirect, dirtscale, indirect); + /* Use dirt scaling on the indirect lighting. + * Except, not in bouncedebug mode. + */ + if (!bouncedebug) { + const vec_t dirtscale = Dirt_GetScaleFactor(lightsurf->occlusion[i], NULL, lightsurf); + VectorScale(indirect, dirtscale, indirect); + } lightsample_t *sample = &lightmap->samples[i]; VectorAdd(sample->color, indirect, sample->color);