- fixed SSAO shader texture assignments.

This commit is contained in:
Christoph Oelckers 2018-06-13 19:04:19 +02:00
parent ce50b0e46b
commit 0b9eaac5e1

View file

@ -129,8 +129,8 @@ void FGLRenderer::AmbientOccludeScene()
// Apply ambient occlusion // Apply ambient occlusion
mBuffers->AmbientFB1.Bind(); mBuffers->AmbientFB1.Bind();
mBuffers->LinearDepthTexture.Bind(0); mBuffers->LinearDepthTexture.Bind(0);
mBuffers->AmbientRandomTexture[randomTexture].Bind(1, GL_NEAREST, GL_REPEAT); mBuffers->AmbientRandomTexture[randomTexture].Bind(2, GL_NEAREST, GL_REPEAT);
mBuffers->BindSceneNormalTexture(2); mBuffers->BindSceneNormalTexture(1);
mSSAOShader->Bind(); mSSAOShader->Bind();
if (gl_multisample > 1) mSSAOShader->Uniforms->SampleIndex = 0; if (gl_multisample > 1) mSSAOShader->Uniforms->SampleIndex = 0;
mSSAOShader->Uniforms->UVToViewA = { 2.0f * invFocalLenX, 2.0f * invFocalLenY }; mSSAOShader->Uniforms->UVToViewA = { 2.0f * invFocalLenX, 2.0f * invFocalLenY };