diff options
author | Dave Parks <davep@lindenlab.com> | 2022-12-12 15:35:52 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-12-12 15:35:52 -0600 |
commit | fe37ea5b3f6e5d0b222441496105072a276e2926 (patch) | |
tree | bbf9a99c42b6acf0f8e8cbf38a1a7f07745a4866 /indra/newview/app_settings/shaders/class1 | |
parent | 2ab424493f09ffcc58ad32922fb6ff52790de2ce (diff) |
SL-18790 Fix for transparent objects casting shadows when they ought not.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index 32e9714a75..1a344045fe 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -48,6 +48,24 @@ void main() discard; } +#if !defined(IS_FULLBRIGHT) + alpha *= vertex_color.a; +#endif + + if (alpha < 0.05) // treat as totally transparent + { + discard; + } + + if (alpha < 0.88) // treat as semi-transparent + { + if (fract(0.5*floor(target_pos_x / post_pos.w )) < 0.25) + { + discard; + } + } + + frag_color = vec4(1,1,1,1); #if !defined(DEPTH_CLAMP) |