light: don't do bounce lighting when dirtdebug/phongdebug are in use

This commit is contained in:
Eric Wasylishen 2016-04-30 01:04:53 -06:00
parent 5e7e409966
commit b1691cf10a
1 changed files with 5 additions and 3 deletions

View File

@ -2128,6 +2128,11 @@ LightFace(bsp2_dface_t *face, facesup_t *facesup, const modelinfo_t *modelinfo,
LightFace_Sky (sun, lightsurf, lightmaps);
}
if (!dirtDebug && !phongDebug) {
/* add indirect lighting */
LightFace_Bounce(bsp, face, lightsurf, lightmaps);
}
/* replace lightmaps with AO for debugging */
if (dirtDebug)
LightFace_DirtDebug(lightsurf, lightmaps);
@ -2135,9 +2140,6 @@ LightFace(bsp2_dface_t *face, facesup_t *facesup, const modelinfo_t *modelinfo,
if (phongDebug)
LightFace_PhongDebug(lightsurf, lightmaps);
/* add indirect lighting */
LightFace_Bounce(bsp, face, lightsurf, lightmaps);
/* Fix any negative values */
for (i = 0; i < MAXLIGHTMAPS; i++) {
if (lightmaps[i].style == 255)