2020-02-22 15:38:54 +04:00

14 lines
283 B
GLSL
Executable File

precision highp float;
varying vec2 varTexcoord;
uniform sampler2D texture;
uniform sampler2D mask;
void main (void)
{
gl_FragColor = texture2D(texture, varTexcoord.st, 0.0);
float srcAlpha = 1.0 - texture2D(mask, varTexcoord.st, 0.0).a;
gl_FragColor.a *= srcAlpha;
}