From 6a42bcccc7cf82ff8e73c0bfcbf35e95ea8f91fb Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Thu, 8 May 2025 16:20:42 +1000 Subject: [PATCH] move inside if --- .../assets/voxy/shaders/post/ssao.comp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/resources/assets/voxy/shaders/post/ssao.comp b/src/main/resources/assets/voxy/shaders/post/ssao.comp index 61c0bf2c..ce5b6042 100644 --- a/src/main/resources/assets/voxy/shaders/post/ssao.comp +++ b/src/main/resources/assets/voxy/shaders/post/ssao.comp @@ -64,21 +64,23 @@ void main() { bool hasAO = (metadata>>6)!=0; vec3 pos = rev3d(vec3(point, depth)); - //TODO: TODO: only encode the axis, then use then it as as a mask along with pos and multiply by the -sign of everything - vec3 viewNormal = vec3(uint((face>>1)==2), uint((face>>1)==0), uint((face>>1)==1)) * (float(int(face)&1)*2-1); - //vec3 viewNormal = vec3(uint((face>>1)==2), uint((face>>1)==0), uint((face>>1)==1)) * (-sign(pos)); - float d = 0.0; + ocolour = colour; + ocolour.w = 1.0f; + if (hasAO) { + float d = 0.0; + //TODO: TODO: only encode the axis, then use then it as as a mask along with pos and multiply by the -sign of everything + vec3 viewNormal = vec3(uint((face>>1)==2), uint((face>>1)==0), uint((face>>1)==1)) * (float(int(face)&1)*2-1); + //vec3 viewNormal = vec3(uint((face>>1)==2), uint((face>>1)==0), uint((face>>1)==1)) * (-sign(pos)); + d = computeAOAngle(pos, 1.0*(1<