light: fix lighting output change in last commit
if the center of a surface light fragment was exactly coplanar with a wall, the last commit would reject it whereas previously, we would still emit light
This commit is contained in:
parent
28776464c7
commit
d1e5daedf0
|
|
@ -84,10 +84,13 @@ static void MakeSurfaceLight(const mbsp_t *bsp, const settings::worldspawn_keys
|
|||
qvec3f point = w.center() + facenormal;
|
||||
|
||||
// optimization - cull surface lights in the void
|
||||
if (Light_PointInWorld(bsp, point))
|
||||
// also try to move them if they're slightly inside a wall
|
||||
auto [fixed_point, success] = FixLightOnFace(bsp, point, false, 0.5f);
|
||||
if (!success) {
|
||||
return;
|
||||
}
|
||||
|
||||
points.push_back(point);
|
||||
points.push_back(fixed_point);
|
||||
});
|
||||
|
||||
// Calculate emit color and intensity...
|
||||
|
|
|
|||
Loading…
Reference in New Issue