summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-10 14:40:39 -0500
committerDave Parks <davep@lindenlab.com>2011-08-10 14:40:39 -0500
commit17f46868d28876b65adcf24a45e6c19a20f2834c (patch)
tree6d496917f91e0a752ad1d9ae63e8252b7a6e6e5e /indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
parentf302e119627090c22325df59c40e1762402a08c6 (diff)
SH-2265 Fix for impostor alpha masking being broken.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index fa811f0d55..75f594ed8f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -5,6 +5,8 @@
* $/LicenseInfo$
*/
+uniform float minimum_alpha;
+uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -14,6 +16,12 @@ uniform sampler2D specularMap;
void main()
{
vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy);
+
+ if (col.a < minimum_alpha || col.a > maximum_alpha)
+ {
+ discard;
+ }
+
gl_FragData[0] = vec4(col.rgb, col.a * 0.005);
gl_FragData[1] = texture2D(specularMap, gl_TexCoord[0].xy);
gl_FragData[2] = vec4(texture2D(normalMap, gl_TexCoord[0].xy).xyz, 0.0);