Discard fragments with alpha=0 in ui painter
This commit is contained in:
parent
78c573b091
commit
c949e0fad9
1 changed files with 2 additions and 0 deletions
|
|
@ -82,6 +82,7 @@ out vec4 out_color;
|
|||
void main()
|
||||
{
|
||||
vec4 tex_color = texture(u_texture, texcoord);
|
||||
if (tex_color.a == 0.0) discard;
|
||||
out_color = vec4(mix(tex_color.rgb, color.rgb, color.a), tex_color.a);
|
||||
}
|
||||
)";
|
||||
|
|
@ -99,6 +100,7 @@ out vec4 out_color;
|
|||
void main()
|
||||
{
|
||||
vec4 tex_color = texture(u_texture, texcoord);
|
||||
if (tex_color.a == 0.0) discard;
|
||||
out_color = tex_color * color;
|
||||
}
|
||||
)";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue