#version 330 core uniform float time; uniform float last_press; in vec2 uv; float map01(float x) { return (x + 1) / 2; } void main() { int c1 = int(time - last_press < 0.8); int c2 = int(floor(time / 0.4)) % 2; gl_FragColor = vec4(1) * (c1 + c2); }