NORSPEC-342 NORSPEC-352 make impostor alpha shader use vertex alpha to remedy unsightly blemishes, boxes, and the occasional extra wing.

meow-7.2.2
Graham Linden 2013-08-15 08:00:47 -07:00
parent 8f4a481610
commit 141c34cff4
1 changed files with 8 additions and 2 deletions

View File

@ -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;
}