From 2f9504b16768283cb9c1bb261a6409d3e19d71ef Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 16 May 2026 17:54:30 -0500 Subject: [PATCH] fix reverseZDepth uniform name --- .../assets/distanthorizons/shaders/apply/blaze/frag.fsh | 4 ++-- .../assets/distanthorizons/shaders/fade/blaze/dh_fade.fsh | 4 ++-- .../distanthorizons/shaders/fade/blaze/vanilla_fade.fsh | 6 +++--- .../assets/distanthorizons/shaders/fog/blaze/frag.fsh | 4 ++-- .../assets/distanthorizons/shaders/ssao/blaze/frag.fsh | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/src/main/resources/assets/distanthorizons/shaders/apply/blaze/frag.fsh b/core/src/main/resources/assets/distanthorizons/shaders/apply/blaze/frag.fsh index b4b16683c..982f679f4 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/apply/blaze/frag.fsh +++ b/core/src/main/resources/assets/distanthorizons/shaders/apply/blaze/frag.fsh @@ -6,7 +6,7 @@ out vec4 fragColor; layout (std140) uniform baseFragUniformBlock { - bool uIsVulkan; + bool uIsReverseZDepth; }; uniform sampler2D uSourceColorTexture; @@ -19,7 +19,7 @@ void main() float fragmentDepth = texture(uSourceDepthTexture, TexCoord).r; bool drawnTo; - if (uIsVulkan) + if (uIsReverseZDepth) { drawnTo = (fragmentDepth != 0.0f); } diff --git a/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/dh_fade.fsh b/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/dh_fade.fsh index 46fc45a26..32178a263 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/dh_fade.fsh +++ b/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/dh_fade.fsh @@ -12,7 +12,7 @@ layout (std140) uniform fragUniformBlock // inverted model view matrix and projection matrix mat4 uDhInvMvmProj; - bool uIsVulkan; + bool uIsReverseZDepth; }; uniform sampler2D uMcColorTexture; @@ -28,7 +28,7 @@ vec3 calcViewPosition(float fragmentDepth, mat4 invMvmProj) { // normalized device coordinates vec4 ndc = vec4(TexCoord.xy, fragmentDepth, 1.0); - if (uIsVulkan) + if (uIsReverseZDepth) { // Z already in [0,1], don't remap ndc.xy = ndc.xy * 2.0 - 1.0; diff --git a/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/vanilla_fade.fsh b/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/vanilla_fade.fsh index d384688d8..49d04521b 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/vanilla_fade.fsh +++ b/core/src/main/resources/assets/distanthorizons/shaders/fade/blaze/vanilla_fade.fsh @@ -22,7 +22,7 @@ layout (std140) uniform fragUniformBlock mat4 uDhInvMvmProj; mat4 uMcInvMvmProj; - bool uIsVulkan; + bool uIsReverseZDepth; }; @@ -35,7 +35,7 @@ vec3 calcViewPosition(float fragmentDepth, mat4 invMvmProj) { // normalized device coordinates vec4 ndc = vec4(TexCoord.xy, fragmentDepth, 1.0); - if (uIsVulkan) + if (uIsReverseZDepth) { // Z already in [0,1], don't remap ndc.xy = ndc.xy * 2.0 - 1.0; @@ -84,7 +84,7 @@ void main() // we only want to fade vanilla rendered objects, not to the sky or LODs bool isGround; - if (uIsVulkan) + if (uIsReverseZDepth) { isGround = (mcFragmentDepth > 0); } diff --git a/core/src/main/resources/assets/distanthorizons/shaders/fog/blaze/frag.fsh b/core/src/main/resources/assets/distanthorizons/shaders/fog/blaze/frag.fsh index a6036262a..444426d79 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/fog/blaze/frag.fsh +++ b/core/src/main/resources/assets/distanthorizons/shaders/fog/blaze/frag.fsh @@ -41,7 +41,7 @@ layout (std140) uniform fragUniformBlock // inverted model view matrix and projection matrix mat4 uInvMvmProj; - bool uIsVulkan; + bool uIsReverseZDepth; }; uniform sampler2D uDhDepthTexture; @@ -142,7 +142,7 @@ vec3 calcViewPosition(float fragmentDepth, mat4 invMvmProj) { // normalized device coordinates vec4 ndc = vec4(TexCoord.xy, fragmentDepth, 1.0); - if (uIsVulkan) + if (uIsReverseZDepth) { // Z already in [0,1], don't remap ndc.xy = ndc.xy * 2.0 - 1.0; diff --git a/core/src/main/resources/assets/distanthorizons/shaders/ssao/blaze/frag.fsh b/core/src/main/resources/assets/distanthorizons/shaders/ssao/blaze/frag.fsh index 6e7f99a10..45a7eb9b1 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/ssao/blaze/frag.fsh +++ b/core/src/main/resources/assets/distanthorizons/shaders/ssao/blaze/frag.fsh @@ -23,7 +23,7 @@ layout (std140) uniform fragUniformBlock mat4 uInvProj; mat4 uProj; - bool uIsVulkan; + bool uIsReverseZDepth; }; uniform sampler2D uDhDepthTexture; @@ -51,7 +51,7 @@ vec3 calcViewPosition(float fragmentDepth, mat4 invMvmProj) { // normalized device coordinates vec4 ndc = vec4(TexCoord.xy, fragmentDepth, 1.0); - if (uIsVulkan) + if (uIsReverseZDepth) { // Z already in [0,1], don't remap ndc.xy = ndc.xy * 2.0 - 1.0; @@ -98,7 +98,7 @@ float GetSpiralOcclusion(const in vec2 uv, const in vec3 viewPos, const in vec3 continue; } - if (uIsVulkan) + if (uIsReverseZDepth) { vec4 ndc = vec4( sampleClipPos.x * 2.0 - 1.0, // UV [0,1] -> NDC [-1,+1] @@ -137,7 +137,7 @@ void main() float occlusion = 0.0; bool isGround; - if (uIsVulkan) + if (uIsReverseZDepth) { isGround = (fragmentDepth > 0.0f); }