Files
PyTaiko/shader/mask.fs
2025-09-08 17:54:32 -04:00

17 lines
368 B
GLSL

#version 330
in vec2 fragTexCoord;
out vec4 fragColor;
uniform sampler2D texture0;
uniform sampler2D texture1;
void main() {
vec4 maskColor = texture(texture0, fragTexCoord);
vec4 rainbowColor = texture(texture1, fragTexCoord);
if (maskColor.a > 0.0) {
fragColor = rainbowColor;
} else {
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
}