mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-23 04:12:42 +00:00
fixed dynamic light face culling using the untransformed (world-space) light position
This commit is contained in:
parent
c8205f9e4e
commit
f773d2a783
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue