49 float bass = texture(
spectrum, 0.03).r;
50 float mid = texture(
spectrum, 0.22).r;
51 float treble = texture(
spectrum, 0.65).r;
52 float air = texture(
spectrum, 0.85).r;
58 vec2 p = (uv - 0.5) * vec2(aspect, 1.0);
61 p *= 1.0 - bass * 0.35;
64 p =
rot(
iTime * 0.4 + mid * 2.5) * p;
67 float segments = 6.0 + floor(treble * 14.0);
68 float angle = atan(p.y, p.x);
69 float radius = length(p);
70 float step_val = 2.0 *
PI / segments;
71 angle = mod(angle, step_val);
72 angle = abs(angle - step_val * 0.5);
75 vec2
crystal = vec2(cos(angle), sin(angle)) * radius;
76 for (
int i = 0; i < 3; i++) {
86 float chroma = (air + treble) * 0.04;
88 col.r = texture(samp, sampUV + vec2(chroma, 0.0)).r;
89 col.g = texture(samp, sampUV).g;
90 col.b = texture(samp, sampUV - vec2(chroma, 0.0)).b;
93 vec3 specWash = 0.5 + 0.5 * cos(6.28318 * (radius -
iTime * 0.3 + vec3(0.0, 0.33, 0.67)));
94 col = mix(col, col * specWash, 0.3 + mid * 0.3);
97 col *= 1.0 + bass * 0.6;
100 col = mix(col, vec3(1.0) - col, smoothstep(0.92, 1.0,
amp_peak));
105 color = vec4(col, 1.0);