Fix ssao being applied to skybox portals

This commit is contained in:
Magnus Norddahl 2017-03-11 17:20:06 +01:00 committed by Christoph Oelckers
parent 0aa0db637c
commit c79051126e
3 changed files with 4 additions and 3 deletions

View file

@ -81,7 +81,8 @@ enum
{
DM_MAINVIEW,
DM_OFFSCREEN,
DM_PORTAL
DM_PORTAL,
DM_SKYPORTAL
};
class FGLRenderer

View file

@ -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);

View file

@ -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--;