light: hack to fix lights exactly on faces

This commit is contained in:
Eric Wasylishen 2016-04-04 23:58:12 -06:00
parent a4276825e9
commit f315366f43
1 changed files with 3 additions and 0 deletions

View File

@ -1159,6 +1159,9 @@ LightFace_Entity(const entity_t *entity, const lightsample_t *light,
}
}
/* 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;