light: calculate normals before correcting points, better results in concave areas

This commit is contained in:
Eric Wasylishen 2016-04-26 01:10:15 -06:00
parent c58528499d
commit a9ea9891bf
1 changed files with 4 additions and 3 deletions

View File

@ -629,9 +629,7 @@ CalcPoints(const modelinfo_t *modelinfo, const vec3_t offset, lightsurf_t *surf,
TexCoordToWorld(us, ut, &surf->texorg, point); TexCoordToWorld(us, ut, &surf->texorg, point);
VectorAdd(point, offset, point); VectorAdd(point, offset, point);
// corrects point // do this before correcting the point, so we can wrap around the inside of pipes
CheckObstructed(surf, offset, us, ut, point);
if (surf->curved) if (surf->curved)
{ {
CalcPointNormal(bsp, face, norm, point, 0); CalcPointNormal(bsp, face, norm, point, 0);
@ -640,6 +638,9 @@ CalcPoints(const modelinfo_t *modelinfo, const vec3_t offset, lightsurf_t *surf,
{ {
VectorCopy(surf->plane.normal, norm); VectorCopy(surf->plane.normal, norm);
} }
// corrects point
CheckObstructed(surf, offset, us, ut, point);
} }
} }
} }