summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_main.c
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2014-03-10 16:12:14 -0500
committerTim Angus <tim@ngus.net>2014-06-17 17:43:41 +0100
commit0c7e57b7c87602024b9ebc5263b09b898625bfcc (patch)
tree12ca22de8f370481aa053a2e0f57c1c9813fb355 /src/renderergl2/tr_main.c
parent8fd8f7c57159f229d5186325b5777817e2d34305 (diff)
Don't say cubemap is outside lightgrid 6 times
Diffstat (limited to 'src/renderergl2/tr_main.c')
-rw-r--r--src/renderergl2/tr_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/renderergl2/tr_main.c b/src/renderergl2/tr_main.c
index 196ca7d9..4a6732b1 100644
--- a/src/renderergl2/tr_main.c
+++ b/src/renderergl2/tr_main.c
@@ -2864,7 +2864,8 @@ void R_RenderCubemapSide( int cubemapIndex, int cubemapSide, qboolean subscene )
vec3_t ambient, directed, lightDir;
R_LightForPoint(tr.refdef.vieworg, ambient, directed, lightDir);
tr.refdef.colorScale = 766.0f / (directed[0] + directed[1] + directed[2] + 1.0f);
- if (directed[0] + directed[1] + directed[2] == 0)
+ // only print message for first side
+ if (directed[0] + directed[1] + directed[2] == 0 && cubemapSide == 0)
{
ri.Printf(PRINT_ALL, "cubemap %d (%f, %f, %f) is outside the lightgrid!\n", cubemapIndex, tr.refdef.vieworg[0], tr.refdef.vieworg[1], tr.refdef.vieworg[2]);
}
@@ -2911,4 +2912,4 @@ void R_RenderCubemapSide( int cubemapIndex, int cubemapSide, qboolean subscene )
{
RE_EndScene();
}
-} \ No newline at end of file
+}