Skip to content

Commit

Permalink
OpenGL2: Fix flares behind mirror being visible
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Feb 13, 2024
1 parent 5d60f60 commit 9881c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/renderergl2/tr_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

//
Expand Down

0 comments on commit 9881c56

Please sign in to comment.