summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index 58aa5a9cb5..75df388941 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -8,13 +8,18 @@
uniform sampler2D diffuseMap;
varying vec3 vary_normal;
-varying vec4 vary_position;
void main()
{
- gl_FragData[0] = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 diff = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy);
+
+ if (diff.a < 0.2)
+ {
+ discard;
+ }
+
+ gl_FragData[0] = vec4(diff.rgb, 0.0);
gl_FragData[1] = vec4(0,0,0,0);
- gl_FragData[2] = vec4(normalize(vary_normal), 0.0);
- gl_FragData[3] = vary_position;
+ gl_FragData[2] = vec4(normalize(vary_normal)*0.5+0.5, 0.0);
}