81 float bass = texture(
spectrum, 0.04).r;
82 float mid = texture(
spectrum, 0.22).r;
83 float hiMid = texture(
spectrum, 0.40).r;
84 float treble = texture(
spectrum, 0.58).r;
85 float air = texture(
spectrum, 0.80).r;
88 vec2 uv = (tc - 0.5) * vec2(aspect, 1.0);
92 pl += sin((uv.x * 5.0 +
iTime) * (1.0 + bass));
93 pl += sin((uv.y * 5.0 +
iTime * 0.7) * (1.0 + mid));
94 pl += sin((uv.x + uv.y +
iTime) * 3.0);
95 pl += cos(length(uv * 10.0 +
iTime) * (2.0 + treble * 3.0));
98 vec3 result = vec3(0.0);
100 float seg = floor(6.0 + bass * 6.0);
102 for (
float d = 0.0; d < 8.0; d++) {
103 float zoom = pow(1.18 + mid * 0.1, d);
106 p *=
rot(d * 0.1 +
iTime * 0.05 + pl * 0.15);
107 p += vec2(pl * 0.06, pl * 0.04);
111 if (kUV.y > kUV.x) kUV = kUV.yx;
112 vec2 texUV =
mirror(kUV * 0.5 + 0.5);
114 float co = d * 0.002 * (1.0 + treble);
116 s.r = texture(samp,
mirror(texUV + vec2(co, 0.0))).r;
117 s.g = texture(samp, texUV).g;
118 s.b = texture(samp,
mirror(texUV - vec2(co, 0.0))).b;
119 s *=
rainbow(d * 0.1 + length(kUV) +
iTime * 0.15 + hiMid);
121 float w = 1.0 / (1.0 + d * 0.5);
128 result +=
rainbow(pl +
iTime * 0.2) * pow(max(pl, 0.0), 2.0) * (0.2 + air * 0.3);
131 result += exp(-length(uv) * 5.0) *
rainbow(
iTime * 0.4 + bass) * 0.15;
133 result = mix(result, result.gbr, air * 0.3);
135 result = mix(result, vec3(1.0) - result, smoothstep(0.9, 1.0,
amp_peak));
137 color = vec4(result, 1.0);