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 a88b324c5..876f9869b 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 @@ -41,8 +41,8 @@ void main() - // the DH texture will have white if nothing was written to that pixel. - if (dhColor == vec4(1)) + // ignore anything that DH hasn't drawn to + if (dhColor.a == 0.0f) { // if not done vanilla clouds will render incorrectly at night dhColor = combinedMcDhColor; 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 da8d123ae..a5aeeffbb 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 @@ -56,8 +56,7 @@ void main() // ignore anything that DH hasn't drawn to - // We don't use DH's depth here because it would prevent the fade from running before DH has loaded - if (dhColor == vec4(1)) + if (dhColor.a == 0.0f) { // if not done vanilla clouds will render incorrectly at night dhColor = combinedMcDhColor; diff --git a/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/dh_fade.frag b/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/dh_fade.frag index a12562b7b..1d9ac3dfa 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/dh_fade.frag +++ b/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/dh_fade.frag @@ -36,11 +36,11 @@ void main() vec4 combinedMcDhColor = texture(uMcColorTexture, TexCoord); // just the DH render pass vec4 dhColor = texture(uDhColorTexture, TexCoord); - - - - // the DH texture will have white if nothing was written to that pixel. - if (dhColor == vec4(1)) + + + + // ignore anything that DH hasn't drawn to + if (dhColor.a == 0.0f) { // if not done vanilla clouds will render incorrectly at night dhColor = combinedMcDhColor; diff --git a/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/vanilla_fade.frag b/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/vanilla_fade.frag index da2064fa0..cf183f5a3 100644 --- a/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/vanilla_fade.frag +++ b/core/src/main/resources/assets/distanthorizons/shaders/fade/gl/vanilla_fade.frag @@ -52,8 +52,7 @@ void main() // ignore anything that DH hasn't drawn to - // We don't use DH's depth here because it would prevent the fade from running before DH has loaded - if (dhColor == vec4(1)) + if (dhColor.a == 0.0f) { // if not done vanilla clouds will render incorrectly at night dhColor = combinedMcDhColor;