134 float aspect = resolution.x / resolution.y;
135 vec2 center =
iMouse.z > 0.0 ?
iMouse.xy / resolution : vec2(0.5);
136 vec2 point = (tc - center) * vec2(aspect, 1.0);
137 float bass = max(texture(spectrum0, 0.04).r,
amp_low);
138 float middle = max(texture(spectrum0, 0.31).r,
amp_mid);
139 float treble = max(texture(spectrum0, 0.77).r,
amp_high);
141 float radius = length(orchid) + 0.0001;
142 float angle = atan(orchid.y, orchid.x);
143 float sonar = sin(radius * (45.0 + bass * 28.0) -
time_f * 8.0);
144 float petals = pow(abs(cos(angle * (5.0 + floor(treble * 5.0)))), 7.0);
145 vec2 live_uv = tc + normalize(orchid) * sonar * petals *
146 (0.015 + bass * 0.04);
149 pow(max(sonar, 0.0), 7.0) * (0.16 + treble * 0.34);
151 vec3 accumulated = live * 1.2;
152 float total_weight = 1.2;
153 for (
int index = 0; index <
SIZE; ++index) {
154 float age = float(index + 1) / float(max(
SIZE, 1));
158 vec2 old_orchid =
orchid_fold(point, old_middle, age);
159 float old_radius = length(old_orchid) + 0.0001;
160 float echo = sin(old_radius * (42.0 + old_bass * 26.0) - age * 19.0);
161 vec2 cache_uv = tc + normalize(old_orchid) * echo *
162 (0.008 + old_bass * 0.025) * age;
163 cache_uv = (
rotate_2d(age * old_treble * 0.8) *
164 (cache_uv - center)) * (1.0 - age * 0.08) + center;
166 memory *= 0.65 +
palette(old_radius + age) * 0.58;
167 float weight = exp(-age * 2.25) * (0.68 + old_bass * 0.55);
168 accumulated += memory * weight;
169 total_weight += weight;
172 vec3 result = accumulated / total_weight;
174 result = (result - 0.5) * (1.1 +
amp_smooth * 0.32) + 0.5;
175 color = vec4(clamp(result, 0.0, 1.0), texture(samp, tc).a);
vec2 fold(vec2 uv, float zoom, float t, vec2 c, float aspect)
Evaluates fold for this shader effect.