summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-08-15 08:00:47 -0700
committerGraham Linden <graham@lindenlab.com>2013-08-15 08:00:47 -0700
commit141c34cff46a7f2be868df45aa1a8de7b95fa4a4 (patch)
treef3c96a6fc2794662f661559ba859f0a138a97865 /indra/newview
parent8f4a481610f64fc37b00fae1c71f57ece3972d8f (diff)
NORSPEC-342 NORSPEC-352 make impostor alpha shader use vertex alpha to remedy unsightly blemishes, boxes, and the occasional extra wing.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index d1abebf84c..cd7a76db28 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -534,11 +534,17 @@ void main()
#ifdef FOR_IMPOSTOR
vec4 color;
color.rgb = diff.rgb;
- color.a = diff.a;
+
+#ifdef USE_VERTEX_COLOR
+ float final_alpha = diff.a * vertex_color.a;
+ diff.rgb *= vertex_color.rgb;
+#else
+ float final_alpha = diff.a;
+#endif
// Insure we don't pollute depth with invis pixels in impostor rendering
//
- if (color.a < 0.01)
+ if (final_alpha < 0.01)
{
discard;
}