32 float hue = mod(t, 1.0) * 6.0;
34 float x = 1.0 - abs(mod(
hue, 2.0) - 1.0);
35 vec3 rgb = (
hue < 1.0) ? vec3(c, x, 0.0) :
36 (
hue < 2.0) ? vec3(x, c, 0.0) :
37 (
hue < 3.0) ? vec3(0.0, c, x) :
38 (
hue < 4.0) ? vec3(0.0, x, c) :
39 (
hue < 5.0) ? vec3(x, 0.0, c) :
48 vec2 center = vec2(0.5, 0.5);
49 vec2 dir = tc - center;
50 float dist = length(dir);
51 float angle = atan(dir.y, dir.x);
53 float amplitude = 3.0;
56 float gradient_pos = mod(dist * scale + (angle + spiralTime) / (2.0 * 3.14159), 1.0);
57 vec3 color_gradient =
rainbow(gradient_pos);
58 vec4 ctx = texture(samp, tc);
59 float time_t = mod(
time_f, 10.0) + 2.0;
60 color = mix(cos(ctx * time_t), vec4(color_gradient, 1.0), 0.5);