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<