summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_scene.c
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2015-12-08 05:17:05 -0800
committerTim Angus <tim@ngus.net>2016-04-07 11:13:30 +0100
commit3372e9eaf5c21e1e44f000e09a94584231ba9550 (patch)
tree77eac07a6bfdd387a11aa1a72c69d41f7b80bd17 /src/renderergl2/tr_scene.c
parente8a31f6a628ca309d1c5119d6d52c391e225445d (diff)
OpenGL2: Add option in code for alternate overbright method.
Diffstat (limited to 'src/renderergl2/tr_scene.c')
-rw-r--r--src/renderergl2/tr_scene.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/renderergl2/tr_scene.c b/src/renderergl2/tr_scene.c
index 51bb412e..94997a8c 100644
--- a/src/renderergl2/tr_scene.c
+++ b/src/renderergl2/tr_scene.c
@@ -350,7 +350,11 @@ void RE_BeginScene(const refdef_t *fd)
}
else
{
+#if defined(USE_OVERBRIGHT)
float scale = pow(2, r_mapOverBrightBits->integer - tr.overbrightBits - 8);
+#else
+ float scale = (1 << r_mapOverBrightBits->integer) / 255.0f;
+#endif
if (r_forceSun->integer)
{
VectorScale(tr.sunLight, scale * r_forceSunLightScale->value, tr.refdef.sunCol);