From 7a989901e85331ae7a041540ae68ac525c4bee9a Mon Sep 17 00:00:00 2001 From: vlj Date: Wed, 9 Jul 2014 18:00:16 +0200 Subject: [PATCH] Fix ssao viz on nvidia. --- src/graphics/render.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index ac44c00e7..458d463bb 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -191,7 +191,11 @@ void IrrDriver::renderGLSL(float dt) if (irr_driver->getNormals()) irr_driver->getFBO(FBO_NORMAL_AND_DEPTHS).BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y); else if (irr_driver->getSSAOViz()) - irr_driver->getFBO(FBO_HALF1_R).BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y); + { + glBindFramebuffer(GL_FRAMEBUFFER, 0); + glViewport(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y); + m_post_processing->renderPassThrough(m_rtts->getFBO(FBO_HALF1_R).getRTT()[0]); + } else if (irr_driver->getRSM()) { glBindFramebuffer(GL_FRAMEBUFFER, 0);