53 vec2 p = (tc - .5) * vec2(A, 1);
54 float r = length(p), an = atan(p.y, p.x);
55 float seg = 12. + floor(b * 8.), w =
T / seg, k = abs(mod(an + w * .5, w) - w * .5);
56 vec2 q = vec2(k * seg, r * 14.);
58 float trace = max(pow(.5 + .5 * cos(q.x *
T), 32.), pow(.5 + .5 * cos(q.y *
T), 32.));
59 float gate = step(.35,
H(
cell));
60 trace *= mix(.3, 1., gate);
61 vec2 uv = fract(vec2(k / w, r * 2. + sin(k * seg) * .08 * m));
62 float ca = .004 + .018 * t;
63 vec3 c = vec3(texture(samp, uv + ca).r, texture(samp, uv).g, texture(samp, uv - ca).b) *
65 float spark = step(.975,
H(
cell + 17.)) * (.5 + .5 * sin(
iTime * 6. +
H(
cell) * 20.));
66 c +=
P(r * .7 + an /
T -
iTime * .06) * (trace * (.35 + 1.5 * a) + spark * (.55 + 2. * t));
67 c +=
P(
iTime * .08) * exp(-abs(r - .24 - b * .04) * 70.) * (.5 + b);
69 c = mix(c, 1. - c, smoothstep(.95, 1.,
amp_peak));
70 color = vec4(1. - exp(-max(c, 0.) * 1.3), 1);