blob: 69fe2ecb470fdc8d6548fbe8d84f1c0f1908dfe7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
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, 1.0 - vertex_texcoord.y);
vec4 texel = texture(texture_data, tcfull);
texel.a *= opacity;
frag_color = texel;
}
|