Fix random texture sampling bug

This commit is contained in:
Magnus Norddahl 2016-09-11 11:09:40 +02:00
parent 0a8cc1b74c
commit 37e3172c94

View file

@ -191,6 +191,8 @@ void FGLRenderer::AmbientOccludeScene()
glBindTexture(GL_TEXTURE_2D, mBuffers->AmbientRandomTexture); glBindTexture(GL_TEXTURE_2D, mBuffers->AmbientRandomTexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
mSSAOShader->Bind(); mSSAOShader->Bind();
mSSAOShader->DepthTexture.Set(0); mSSAOShader->DepthTexture.Set(0);