ludum_dare_46/res/shaders/s2e/frag.gls

18 lines
322 B
Text
Raw Normal View History

#version 330 core
uniform sampler2D sampler;
2024-08-07 05:02:56 +00:00
uniform vec3 iColor;
uniform float time;
in vec2 texCoords;
out vec4 color;
void main() {
2024-08-07 05:02:56 +00:00
vec4 sample = texture(sampler, texCoords);
float x = sample.r + time;
2024-08-07 05:02:57 +00:00
color = vec4(iColor, mod(floor(x), 2) * (-x + 2) * sample.a);
2024-08-07 05:02:56 +00:00
if (color.a == 0) {
discard;
2024-08-07 05:02:56 +00:00
}
}