diff --git a/src/gl/renderer/gl_renderer.h b/src/gl/renderer/gl_renderer.h index ed2c523f28..b784e74fdb 100644 --- a/src/gl/renderer/gl_renderer.h +++ b/src/gl/renderer/gl_renderer.h @@ -79,7 +79,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 4cf8b9e7ba..967f6b3fc1 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -655,7 +655,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 a3c896b276..1e4b7ac585 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -491,7 +491,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--;