Turn off occlusion culling for mirrors and subviews

This commit is contained in:
Robert Beckebans 2024-08-26 22:58:59 +02:00
parent a7d1d7f72e
commit 930c968fa9
2 changed files with 2 additions and 2 deletions

View file

@ -271,7 +271,7 @@ static void R_AddSingleLight( viewLight_t* vLight )
// RB: test surface visibility by drawing the triangles of the bounds
// FIXME spot light projections are too short
if( r_useMaskedOcclusionCulling.GetBool() && !viewInsideLight )
if( r_useMaskedOcclusionCulling.GetBool() && !viewInsideLight && !viewDef->isMirror && !viewDef->isSubview )
{
idVec4 triVerts[8];
unsigned int triIndices[] = { 0, 1, 2 };

View file

@ -681,7 +681,7 @@ void R_AddSingleModel( viewEntity_t* vEntity )
const bool viewInsideSurface = !idRenderMatrix::CullPointToMVP( cullSurfaceProject, localViewOrigin, false );
// RB: test surface visibility by drawing the triangles of the bounds
if( r_useMaskedOcclusionCulling.GetBool() && !viewInsideSurface )
if( r_useMaskedOcclusionCulling.GetBool() && !viewInsideSurface && !viewDef->isMirror && !viewDef->isSubview )
{
#if 1
if( !model->IsStaticWorldModel() && !renderEntity->weaponDepthHack && renderEntity->modelDepthHack == 0.0f )