add depthcheck to voxy forward rendering to fix incorrectly visible water with some mods

This commit is contained in:
Xonk
2026-04-21 14:49:36 -04:00
parent 56107a9983
commit 6aa092d989
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -17,7 +17,8 @@
"noisetex",
"colortex4",
"colortex5",
"vxDepthTexOpaque"
"vxDepthTexOpaque",
"depthtex1"
],
"uniforms": [
"vxRenderDistance",
+2
View File
@@ -327,4 +327,6 @@ void voxy_emitFragment(VoxyFragmentParameters parameters) {
#if DEBUG_VIEW == debug_ALBEDO
FORWARD_RENDERED_COLOR.rgba = unalteredAlbedo;
#endif
if(texelFetch(depthtex1, ivec2(gl_FragCoord.xy),0).r < 1.0) FORWARD_RENDERED_COLOR.a = 0.0;
}