From 645e5d7f38ec38dc27a847e1b2439aa97e63dd74 Mon Sep 17 00:00:00 2001 From: gri573 Date: Thu, 6 Jun 2024 10:50:54 +0200 Subject: [PATCH 1/2] fix block entities and entities behind translucents (and maybe discoloured enchantment glint) on some systems --- shaders/dimensions/all_solid.fsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shaders/dimensions/all_solid.fsh b/shaders/dimensions/all_solid.fsh index 4f2dab2..92dd2f2 100644 --- a/shaders/dimensions/all_solid.fsh +++ b/shaders/dimensions/all_solid.fsh @@ -446,14 +446,14 @@ void main() { #ifdef HAND if (Albedo.a > 0.1){ Albedo.a = 0.75; - gl_FragData[3].a = 0.0; + gl_FragData[3] = vec4(0.0); } else { Albedo.a = 1.0; } #endif #if defined PARTICLE_RENDERING_FIX && (defined ENTITIES || defined BLOCKENTITIES) - gl_FragData[3].a = 0.0; + gl_FragData[3] = vec4(0.0); #endif From 302ad6958e355f2883e9d2ebd9c141b188ccdf10 Mon Sep 17 00:00:00 2001 From: gri573 Date: Thu, 6 Jun 2024 12:33:11 +0200 Subject: [PATCH 2/2] don't leave gl_FragData[3] uninitialised at all in all_solid.fsh --- shaders/dimensions/all_solid.fsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shaders/dimensions/all_solid.fsh b/shaders/dimensions/all_solid.fsh index 92dd2f2..dd9dd2d 100644 --- a/shaders/dimensions/all_solid.fsh +++ b/shaders/dimensions/all_solid.fsh @@ -446,13 +446,12 @@ void main() { #ifdef HAND if (Albedo.a > 0.1){ Albedo.a = 0.75; - gl_FragData[3] = vec4(0.0); } else { Albedo.a = 1.0; } #endif - #if defined PARTICLE_RENDERING_FIX && (defined ENTITIES || defined BLOCKENTITIES) + #if defined HAND || defined ENTITIES || defined BLOCKENTITIES gl_FragData[3] = vec4(0.0); #endif