From f315366f43c7e8e97142c1d3d1bee963e3f9577e Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 4 Apr 2016 23:58:12 -0600 Subject: [PATCH] light: hack to fix lights exactly on faces --- light/ltface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/light/ltface.c b/light/ltface.c index 34e914a9..6b09ae9c 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -1158,6 +1158,9 @@ LightFace_Entity(const entity_t *entity, const lightsample_t *light, spotscale = 1.0 - spotscale; } } + + /* HACK: support lights lying exactly on a face by only tracing up to 0.1 units from the light */ + dist = qmax(0.0f, dist - 0.1f); if (!TestLight_embree(surfpoint, ray, dist, modelinfo)) continue;