fixed dynamic light face culling using the untransformed (world-space) light position

This commit is contained in:
myT 2020-02-26 23:01:28 +01:00
parent c8205f9e4e
commit f773d2a783
2 changed files with 3 additions and 1 deletions

View File

@ -137,6 +137,8 @@ chg: r_fullbright is now latched again
chg: negative r_swapInterval values will request adaptive V-Sync when using an OpenGL back-end
fix: dynamic lights could incorrectly stop applying to moving entities (e.g. cpm25 elevator)
fix: crash due to lack of memory for the sound system
fix: incorrect shader state when loading a map with no lighting

View File

@ -156,7 +156,7 @@ static qbool R_LightCullBounds( const dlight_t* dl, const vec3_t mins, const vec
static qbool R_LightCullFace( const srfSurfaceFace_t* face, const dlight_t* dl )
{
float d = DotProduct( dl->origin, face->plane.normal ) - face->plane.dist;
const float d = DotProduct( dl->transformed, face->plane.normal ) - face->plane.dist;
if ( (d < -dl->radius) || (d > dl->radius) )
return qtrue;