treppe-gl/shaders/flow.glsl
April John 5e6bc54d08 Add treppe-gl shader renderer for treppe2000
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 14:34:05 +02:00

10 lines
316 B
GLSL

// Rainbow flowing up the stairs
vec3 hue(float h) {
return clamp(abs(mod(h * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0,
0.0, 1.0);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
float x = fragCoord.x / iResolution.x;
fragColor = vec4(hue(fract(x - iTime * 0.1)), 1.0);
}