From 141c34cff46a7f2be868df45aa1a8de7b95fa4a4 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 15 Aug 2013 08:00:47 -0700 Subject: NORSPEC-342 NORSPEC-352 make impostor alpha shader use vertex alpha to remedy unsightly blemishes, boxes, and the occasional extra wing. --- indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra') 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; } -- cgit v1.2.3