SSAO: Disable alpha test and simplify code
This commit is contained in:
parent
993d1e26dc
commit
684d265924
@ -53,7 +53,7 @@ void main(void)
|
|||||||
vec4 occluderPos = invprojm * vec4(sampleProj.xy, 2.0 * occluderFragmentDepth - 1.0, 1.0f);
|
vec4 occluderPos = invprojm * vec4(sampleProj.xy, 2.0 * occluderFragmentDepth - 1.0, 1.0f);
|
||||||
occluderPos /= occluderPos.w;
|
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.;
|
bl += isOccluded ? smoothstep(radius, 0, distance(samplePos, FragPos)) : 0.;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,6 +531,7 @@ void PostProcessing::renderSSAO(const core::matrix4 &invprojm, const core::matri
|
|||||||
{
|
{
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
|
glDisable(GL_ALPHA_TEST);
|
||||||
|
|
||||||
glUseProgram(FullScreenShader::SSAOShader::Program);
|
glUseProgram(FullScreenShader::SSAOShader::Program);
|
||||||
glBindVertexArray(FullScreenShader::SSAOShader::vao);
|
glBindVertexArray(FullScreenShader::SSAOShader::vao);
|
||||||
|
Loading…
Reference in New Issue
Block a user