ludum_dare_43/res/shaders/s2t/frag.gls

21 lines
352 B
Text
Raw Permalink Normal View History

2024-08-07 05:00:26 +00:00
#version 330 core
uniform sampler2D sampler;
uniform vec4 iColor = vec4(1, 1, 1, 1);
uniform float alpha = 1;
uniform float amount = 1;
in vec2 texCoords;
out vec4 color;
void main() {
vec4 texColor = texture(sampler, texCoords);
if(texColor.a == 0)
discard;
else {
color = mix(iColor, texColor, amount);
color.a = color.a * alpha;
}
}