From 92a9369bbcaa51ab4e50a4a8d976e21a0903a79b Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 28 May 2016 13:38:12 -0600 Subject: [PATCH] light: remove hack for lights directly on faces, was breaking phong shading. --- light/ltface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/light/ltface.c b/light/ltface.c index 9318c8aa..69e1a74b 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -1342,7 +1342,10 @@ LightFace_Entity(const bsp2_t *bsp, angle = -angle; // ericw -- support "_bleed" option } } - angle = qmax(0.0f, angle); // light can be behind sample point if the light is right on the face + + /* Light behind sample point? Zero contribution, period. */ + if (angle < 0) + continue; /* Check spotlight cone */ spotscale = 1;