summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_scene.c
diff options
context:
space:
mode:
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);