summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2026-01-20 23:30:35 -0500
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-21 19:04:29 +0200
commita7d1c4e3430e7e6b659548b16e0371893a350762 (patch)
treeac46c607d0521d8c6611eef2e55390422c3edd2b
parent8a1c9a58ab9feaa8547cc42e9b266c454f09baad (diff)
secondlife/viewer#3584 Fix avatar body mesh and system clothing conflicting with water and alpha due to missing discard of invisible pixels
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index cc9d72fae6..53bd0c741f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -51,9 +51,7 @@ in vec3 vary_norm;
in vec4 vertex_color; //vertex color should be treated as sRGB
#endif
-#ifdef HAS_ALPHA_MASK
uniform float minimum_alpha;
-#endif
uniform mat4 proj_mat;
uniform mat4 inv_proj;
@@ -225,6 +223,13 @@ void main()
float final_alpha = diffuse_linear.a;
+#ifdef IS_AVATAR_SKIN
+ if(final_alpha < minimum_alpha)
+ {
+ discard;
+ }
+#endif
+
#ifdef USE_VERTEX_COLOR
final_alpha *= vertex_color.a;