From 2128b991173b03fd5b8811ed1a30aa66393cfd0e Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 3 Jul 2018 23:21:54 +0200 Subject: [PATCH] - fix ssao not working when multisample was off --- src/hwrenderer/postprocessing/hw_postprocess.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hwrenderer/postprocessing/hw_postprocess.cpp b/src/hwrenderer/postprocessing/hw_postprocess.cpp index 3df7f24d5..d3f150e32 100644 --- a/src/hwrenderer/postprocessing/hw_postprocess.cpp +++ b/src/hwrenderer/postprocessing/hw_postprocess.cpp @@ -794,7 +794,7 @@ void PPAmbientOcclusion::UpdateSteps() // Calculate linear depth values { PPStep step; - step.ShaderName = gl_multisample ? "SSAO.LinearDepthMS" : "SSAO.LinearDepth"; + step.ShaderName = gl_multisample > 1 ? "SSAO.LinearDepthMS" : "SSAO.LinearDepth"; step.Uniforms.Set(linearUniforms); step.Viewport = ambientViewport; step.SetInputSceneDepth(0); @@ -807,7 +807,7 @@ void PPAmbientOcclusion::UpdateSteps() // Apply ambient occlusion { PPStep step; - step.ShaderName = gl_multisample ? "SSAO.AmbientOccludeMS" : "SSAO.AmbientOcclude"; + step.ShaderName = gl_multisample > 1 ? "SSAO.AmbientOccludeMS" : "SSAO.AmbientOcclude"; step.Uniforms.Set(ssaoUniforms); step.Viewport = ambientViewport; step.SetInputTexture(0, "SSAO.LinearDepth"); @@ -839,7 +839,7 @@ void PPAmbientOcclusion::UpdateSteps() // Add SSAO back to scene texture: { PPStep step; - step.ShaderName = gl_multisample ? "SSAO.CombineMS" : "SSAO.Combine"; + step.ShaderName = gl_multisample > 1 ? "SSAO.CombineMS" : "SSAO.Combine"; step.Uniforms.Set(combineUniforms); step.Viewport = screen->mSceneViewport; step.SetInputTexture(0, "SSAO.Ambient0", PPFilterMode::Linear);