Add fire, ocean, heartbeat, bounce, trans and storm shaders

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
April John 2026-10-16 15:03:47 +02:00
commit cebb41dbc7

19
shaders/trans.glsl Normal file
View file

@ -0,0 +1,19 @@
// Trans flag, gently waving. The white stripe uses the white LEDs.
vec3 stripe(int k) {
if (k == 0 || k == 4) return vec3(0.25, 0.75, 1.0); // blue
if (k == 1 || k == 3) return vec3(1.0, 0.35, 0.55); // pink
return vec3(1.0); // white
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
float i = floor(fragCoord.x / iResolution.x * 16.0);
float x = (i + 0.5) / 13.0;
float p = x * 5.0 + 0.5 * sin(iTime * 0.3) + 0.25 * sin(x * 6.0 - iTime * 0.7);
p = clamp(p, 0.0, 4.999);
int k = int(floor(p));
float f = smoothstep(0.7, 1.0, fract(p));
vec3 col = mix(stripe(k), stripe(min(k + 1, 4)), f);
col *= 0.9 + 0.1 * sin(i * 0.5 - iTime * 0.8);
fragColor = vec4(col * 0.8, 1.0);
}