NORSPEC-342 NORSPEC-352 make impostor alpha shader use vertex alpha to remedy unsightly blemishes, boxes, and the occasional extra wing.
parent
8f4a481610
commit
141c34cff4
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue