33vec2
whirl(vec2 uv, vec2 center,
float direction) {
35 vec2 ar = vec2(aspect, 1.0);
36 vec2 p = (uv - center) * ar;
37 float r = length(p) + 0.025;
38 float a = atan(p.y, p.x);
39 a += direction * (1.0 / r +
time_f * 1.25);
40 r += sin(r * 48.0 -
time_f * 9.0 + direction * a * 6.0) * 0.045;
41 return vec2(cos(a), sin(a)) * r / ar + center;
48 vec2 orbit = vec2(cos(
time_f * 0.7), sin(
time_f * 0.7)) * 0.17;
49 vec2 u0 =
whirl(tc, vec2(0.5) + orbit, 1.0);
50 vec2 u1 =
whirl(tc, vec2(0.5) - orbit, -1.0);
51 vec2 uv = fract(mix(u0, u1, 0.5 + 0.5 * sin((tc.x + tc.y) * 35.0 -
time_f * 6.0)));
52 vec4 c0 = texture(samp, uv);
53 vec4 c1 = texture(samp, fract(mix(u1, u0, 0.36)));
54 float braid = 0.5 + 0.5 * sin((tc.x - tc.y) * 50.0 +
time_f * 8.0);
55 color = vec4(mix(c0.rgb, c1.bgr, braid * 0.42), c0.a);