File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1622,8 +1622,6 @@ void RB_RenderSSAO()
16221622
16231623 RB_PrepareForSamplingDepthMap ();
16241624
1625- TransitionMSAAToMain ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
1626-
16271625 GL_State ( GLS_DEPTHTEST_DISABLE | GLS_SRCBLEND_DST_COLOR | GLS_DSTBLEND_ZERO );
16281626 GL_Cull ( cullType_t::CT_TWO_SIDED );
16291627
@@ -1655,8 +1653,6 @@ void RB_RenderSSAO()
16551653
16561654 Tess_InstantScreenSpaceQuad ();
16571655
1658- TransitionMainToMSAA ( GL_COLOR_BUFFER_BIT );
1659-
16601656 GL_CheckErrors ();
16611657}
16621658
@@ -2800,11 +2796,16 @@ static void RB_RenderView( bool depthPass )
28002796 RB_RenderDrawSurfaces ( shaderSort_t::SS_ENVIRONMENT_FOG, shaderSort_t::SS_OPAQUE, DRAWSURFACES_ALL );
28012797 }
28022798
2799+ // Here so we don't do an extra MSAA resolve if both SSAO and global fog are present
2800+ TransitionMSAAToMain ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
2801+
28032802 RB_RenderSSAO ();
28042803
28052804 // render global fog post process effect
28062805 RB_RenderGlobalFog ();
28072806
2807+ TransitionMainToMSAA ( GL_COLOR_BUFFER_BIT );
2808+
28082809 // draw everything that is translucent
28092810 if ( glConfig.usingMaterialSystem ) {
28102811 materialSystem.RenderMaterials ( shaderSort_t::SS_ENVIRONMENT_NOFOG, shaderSort_t::SS_POST_PROCESS, backEnd.viewParms .viewID );
Original file line number Diff line number Diff line change @@ -896,10 +896,7 @@ void Render_generic3D( shaderStage_t *pStage )
896896 {
897897 RB_PrepareForSamplingDepthMap ();
898898
899- if ( glConfig.MSAA && backEnd.dirtyDepthBuffer ) {
900- TransitionMSAAToMain ( GL_DEPTH_BUFFER_BIT );
901- R_BindFBO ( GL_DRAW_FRAMEBUFFER, tr.msaaFBO );
902- }
899+ TransitionMSAAToMain ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
903900 }
904901
905902 // choose right shader program ----------------------------------
@@ -988,6 +985,10 @@ void Render_generic3D( shaderStage_t *pStage )
988985
989986 Tess_DrawElements ();
990987
988+ if ( needDepthMap ) {
989+ TransitionMainToMSAA ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
990+ }
991+
991992 GL_CheckErrors ();
992993}
993994
You can’t perform that action at this time.
0 commit comments