From 9881c561ad1796a68ddb88616d7da6d806f29a60 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 13 Feb 2024 05:50:01 -0600 Subject: [PATCH] OpenGL2: Fix flares behind mirror being visible When r_ext_framebuffer_multisample > 0 was used, flares behind the mirror in q3tourney6 were incorrectly visible. This was because it checks scene depth in the depth prepass which only drew opaque surfaces. It also needs to contain depth for mirror/portal surfaces. --- code/renderergl2/tr_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index 7387101b..5c160ab4 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -455,7 +455,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) { for (i = 0, drawSurf = drawSurfs ; i < numDrawSurfs ; i++, drawSurf++) { if ( drawSurf->sort == oldSort && drawSurf->cubemapIndex == oldCubemapIndex) { - if (backEnd.depthFill && shader && shader->sort != SS_OPAQUE) + if (backEnd.depthFill && shader && (shader->sort != SS_OPAQUE && shader->sort != SS_PORTAL)) continue; // fast path, same as previous sort @@ -484,7 +484,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) { oldCubemapIndex = cubemapIndex; } - if (backEnd.depthFill && shader && shader->sort != SS_OPAQUE) + if (backEnd.depthFill && shader && (shader->sort != SS_OPAQUE && shader->sort != SS_PORTAL)) continue; //