blob: 2a148607d842604cb10869a2810145b5713de71e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
uniform sampler2D texture_data;
uniform float transparency;
void main()
{
float opacity = 1.0 - clamp(transparency, 0.0, 1.0);
vec2 tcfull = vec2(vertex_texcoord.x, vertex_texcoord.y);
vec4 texel = texture(texture_data, tcfull);
if (texel.a != 1.0) {
discard;
}
texel.a *= opacity;
frag_color = texel;
}
|