light: contributing faces: don't contribute if angle btn faces is 90 degrees or more

This commit is contained in:
Eric Wasylishen 2017-02-22 00:28:25 -07:00
parent cafadddb62
commit 64e8090326
1 changed files with 7 additions and 1 deletions

View File

@ -159,6 +159,13 @@ vector<contribface_stackframe_t> SetupContributingFaces_R(const contribface_stac
if (!Face_IsLightmapped(bsp, f))
return {};
// Check angle between reference face and this face
const glm::vec3 refNormal = Face_Normal_E(bsp, refFace);
const glm::vec3 fNormal = Face_Normal_E(bsp, f);
if (dot(fNormal, refNormal) <= 0)
return {};
//printf("%s\n", Face_TextureName(bsp, f));
// transformFromRefFace will rotate `f` so it lies on the same plane as the reference face
@ -215,7 +222,6 @@ vector<contribface_stackframe_t> SetupContributingFaces_R(const contribface_stac
}
// walk edges
const glm::vec3 fNormal = Face_Normal_E(bsp, f);
vector<contribface_stackframe_t> nextframes;