diff --git a/src/gl/renderer/gl_renderer.h b/src/gl/renderer/gl_renderer.h index ed98ffe2b..4d8883205 100644 --- a/src/gl/renderer/gl_renderer.h +++ b/src/gl/renderer/gl_renderer.h @@ -81,7 +81,8 @@ enum { DM_MAINVIEW, DM_OFFSCREEN, - DM_PORTAL + DM_PORTAL, + DM_SKYPORTAL }; class FGLRenderer diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index ed8993df8..a43025334 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -659,7 +659,7 @@ void GLSkyboxPortal::DrawContents() SaveMapSection(); currentmapsection[mapsection >> 3] |= 1 << (mapsection & 7); - GLRenderer->DrawScene(DM_PORTAL); + GLRenderer->DrawScene(DM_SKYPORTAL); portal->mFlags &= ~PORTSF_INSKYBOX; inskybox = false; gl_RenderState.SetDepthClamp(oldclamp); diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 2dcb8e764..198cb4fbd 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -495,7 +495,7 @@ void FGLRenderer::DrawScene(int drawmode) { ssao_portals_available = 0; } - else if (ssao_portals_available > 0) + else if (drawmode == DM_PORTAL && ssao_portals_available > 0) { applySSAO = true; ssao_portals_available--;