From 930c968fa9dee39c94f1a29ec38d7ffea21f060b Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Mon, 26 Aug 2024 22:58:59 +0200 Subject: [PATCH] Turn off occlusion culling for mirrors and subviews --- neo/renderer/tr_frontend_addlights.cpp | 2 +- neo/renderer/tr_frontend_addmodels.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neo/renderer/tr_frontend_addlights.cpp b/neo/renderer/tr_frontend_addlights.cpp index fe6ba275..ca2c3736 100644 --- a/neo/renderer/tr_frontend_addlights.cpp +++ b/neo/renderer/tr_frontend_addlights.cpp @@ -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 }; diff --git a/neo/renderer/tr_frontend_addmodels.cpp b/neo/renderer/tr_frontend_addmodels.cpp index 626efe76..23599d93 100644 --- a/neo/renderer/tr_frontend_addmodels.cpp +++ b/neo/renderer/tr_frontend_addmodels.cpp @@ -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 )