diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-05-30 14:44:39 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-05-30 14:44:39 -0500 |
| commit | 2207b979ebb4f453fdda721710a7cc1b71df55b2 (patch) | |
| tree | 2852bd0c26b04d486545ef8309cd7956926d9463 /indra/newview/app_settings/shaders/class2 | |
| parent | 2e26dc3971f80fb177c53bc20c06798bbe4391a6 (diff) | |
MAINT-622 Fix for broken alpha masking on avatar clothing when Lighting and Shadows enabled.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
| -rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl index 931577359e..d6848c8dc1 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl @@ -31,6 +31,8 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif +uniform float minimum_alpha; + uniform sampler2DRectShadow shadowMap0; uniform sampler2DRectShadow shadowMap1; uniform sampler2DRectShadow shadowMap2; @@ -95,6 +97,13 @@ void main() float shadow = 0.0; vec4 pos = vec4(vary_position, 1.0); + vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy); + + if (diff.a < minimum_alpha) + { + discard; + } + vec4 spos = pos; if (spos.z > -shadow_clip.w) @@ -162,8 +171,6 @@ void main() shadow = 1.0; } - vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy); - vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, 1.0); vec4 color = diff * col; |
