light: fix lighting artifacts with _mirrorinside. Was missing a plane side

check, so the inside faces were incorrectly considered as neighbours
for distributing sample points onto.

Fixes #236
This commit is contained in:
Eric Wasylishen 2019-03-25 20:24:39 -06:00
parent 83d9071269
commit 707acbc9c5
1 changed files with 5 additions and 2 deletions

View File

@ -311,9 +311,12 @@ Face_EdgeIndexSmoothed(const mbsp_t *bsp, const bsp2_dface_t *f, const int edgei
// Invalid face, e.g. with vertex numbers: [0, 1, 0, 2]
continue;
}
const bool sameplane = (neighbour->planenum == f->planenum
&& neighbour->side == f->side);
// Check if these faces are smoothed or on the same plane
if (!(FacesSmoothed(f, neighbour) || neighbour->planenum == f->planenum)) {
if (!(FacesSmoothed(f, neighbour) || sameplane)) {
continue;
}