From 684d265924c4ab2ce9186284af474e772d2073c3 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Mon, 27 Jan 2014 00:53:52 +0100 Subject: [PATCH] SSAO: Disable alpha test and simplify code --- data/shaders/ssao.frag | 2 +- src/graphics/post_processing.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/data/shaders/ssao.frag b/data/shaders/ssao.frag index 66cd5d46f..9e6b1a250 100644 --- a/data/shaders/ssao.frag +++ b/data/shaders/ssao.frag @@ -53,7 +53,7 @@ void main(void) vec4 occluderPos = invprojm * vec4(sampleProj.xy, 2.0 * occluderFragmentDepth - 1.0, 1.0f); occluderPos /= occluderPos.w; - bool isOccluded = isInsideTexture && (sampleProj.z > (2. * occluderFragmentDepth - 1.0)) && (distance(FragPos, occluderPos) < radius); + bool isOccluded = isInsideTexture && (sampleProj.z > (2. * occluderFragmentDepth - 1.0)); bl += isOccluded ? smoothstep(radius, 0, distance(samplePos, FragPos)) : 0.; } diff --git a/src/graphics/post_processing.cpp b/src/graphics/post_processing.cpp index 5f2f6c5f9..41e0052db 100644 --- a/src/graphics/post_processing.cpp +++ b/src/graphics/post_processing.cpp @@ -531,6 +531,7 @@ void PostProcessing::renderSSAO(const core::matrix4 &invprojm, const core::matri { glDisable(GL_DEPTH_TEST); glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); glUseProgram(FullScreenShader::SSAOShader::Program); glBindVertexArray(FullScreenShader::SSAOShader::vao);