summaryrefslogtreecommitdiff
path: root/src/refresh/sw/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refresh/sw/alias.c')
-rw-r--r--src/refresh/sw/alias.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/refresh/sw/alias.c b/src/refresh/sw/alias.c
index 0970f6d..dad1748 100644
--- a/src/refresh/sw/alias.c
+++ b/src/refresh/sw/alias.c
@@ -472,8 +472,6 @@ static void R_AliasSetupSkin(void)
/*
================
R_AliasSetupLighting
-
- FIXME: put lighting into tables
================
*/
static void R_AliasSetupLighting(void)
@@ -484,13 +482,11 @@ static void R_AliasSetupLighting(void)
// all components of light should be identical in software
if (currententity->flags & RF_FULLBRIGHT) {
- for (i = 0; i < 3; i++)
- light[i] = 1.0;
+ VectorSet(light, 1, 1, 1);
} else {
R_LightPoint(currententity->origin, light);
}
-
if (currententity->flags & RF_MINLIGHT) {
for (i = 0; i < 3; i++)
if (light[i] < 0.1)
@@ -511,6 +507,9 @@ static void R_AliasSetupLighting(void)
}
}
+ for (i = 0; i < 3; i++)
+ clamp(light[i], 0, 1);
+
j = LUMINANCE(light[0], light[1], light[2]) * 256;
r_ambientlight = 0;