- restore the viewport after the SSAO pass.

This runs through the generic postprocessing code which restores the screen's viewport but since this is run in the middle of the scene it needs to restore the scene's viewport (i.e. the window controlled by screenblocks.)
This commit is contained in:
Christoph Oelckers 2018-07-28 19:01:04 +02:00
parent 66f616dc1a
commit 7e69cd862e
1 changed files with 1 additions and 0 deletions

View File

@ -333,6 +333,7 @@ void FDrawInfo::DrawScene(int drawmode)
{
gl_RenderState.EnableDrawBuffers(1);
GLRenderer->AmbientOccludeScene(VPUniforms.mProjectionMatrix.get()[5]);
glViewport(screen->mSceneViewport.left, screen->mSceneViewport.top, screen->mSceneViewport.width, screen->mSceneViewport.height);
GLRenderer->mBuffers->BindSceneFB(true);
gl_RenderState.EnableDrawBuffers(gl_RenderState.GetPassDrawBufferCount());
gl_RenderState.Apply();