276float effect_field(vec2 point,
float bass,
float middle,
float treble) {
277 float radius = length(point) + 0.0001;
278 float angle = atan(point.y, point.x);
283 float nova = sin(radius * (34.0 + bass * 22.0) - time * 8.0);
284 float rays = pow(abs(cos(angle * (10.0 + floor(treble * 7.0)) + time)), 10.0);
285 float arches = cos(sqrt(point.x * point.x + 0.003) * 16.0 - point.y * 6.0);
286 field = nova * 0.28 + rays * exp(-radius * 2.0) * 0.55 + arches * 0.17;
288 float cross_wave = sin(point.x * 16.0 + time * 5.0) + sin(point.y * 18.0 + time * 4.0);
289 field = cross_wave * 0.18 + sin(angle * 6.0 - radius * 24.0 + time * 5.0) * 0.4;
292 glass.x *= 1.0 + abs(point.y) * (1.8 + middle);
293 field = sin(length(glass) * 29.0 - time * 5.0) * 0.35;
294 field += exp(-abs(point.x) * (8.0 + middle * 7.0)) * cos(point.y * 19.0) * 0.35;
297 float plate = pow(max(1.0 - length(
cell) * 1.5, 0.0), 5.0);
298 field = plate * 0.65 + sin(radius * (28.0 + bass * 18.0) - time * 6.0) * 0.3;
300 vec2 petal =
kaleidoscope(point, 7.0 + floor(treble * 5.0));
301 field = cos(atan(petal.y, petal.x) * 5.0 - length(petal) * 19.0) * 0.4;
302 field += sin(length(petal - vec2(0.2, 0.0)) * 28.0 - time * 5.0) * 0.3;
304 float sonar = sin(radius * (31.0 + bass * 18.0) - time * 8.0);
305 float spiral = sin(angle * 5.0 - radius * 17.0 + time * 3.0);
306 field = sonar * 0.38 + spiral * 0.34;
308 float lattice_x = sin(point.x * 18.0 + sin(point.y * 7.0 - time) * 4.0);
309 float lattice_y = sin(point.y * 17.0 + cos(point.x * 8.0 + time) * 4.0);
310 field = (1.0 - abs(lattice_x * lattice_y)) * 0.55 + sin(radius * 27.0 - time * 6.0) * 0.25;
313 float facet = pow(max(1.0 - length(
cell) * 1.6, 0.0), 7.0);
314 field = facet * 0.7 + cos(atan(
cell.y,
cell.x) * 6.0) * facet * 0.2;
316 float rose = cos(angle * (8.0 + floor(treble * 5.0)) - radius * 13.0 + time * 2.0);
317 field = pow(max(rose, 0.0), 5.0) * exp(-radius * 1.5) * 0.75;
318 field += sin(radius * 27.0 - time * 6.0) * 0.25;
320 float fold =
ping_pong(radius + time * (0.18 + bass * 0.2), 0.34);
321 field = sin(
fold * (42.0 + middle * 20.0)) * 0.48;
322 field += cos(angle * 8.0 + floor(radius * 11.0) * 1.6) * 0.25;
324 vec2 grid = abs(fract((point +
fbm(point * 4.0) * 0.05) * 10.0) - 0.5);
325 float circuit = exp(-min(grid.x, grid.y) * (30.0 + treble * 24.0));
326 field = circuit * 0.65 + sin(radius * 26.0 - time * 6.0) * 0.28;
328 float ribbon_a = sin(point.x * 15.0 + sin(point.y * 6.0 - time) * 5.0);
329 float ribbon_b = cos(point.y * 14.0 + sin(point.x * 7.0 + time) * 4.0);
330 field = (ribbon_a + ribbon_b) * 0.25 + sin(angle * 4.0 - radius * 17.0) * 0.2;
333 float tunnel = sin(log(length(
crystal) + 0.07) * (15.0 + bass * 6.0) - time * 5.0);
336 float fault = tanh(sin(point.x * 8.0 +
fbm(point * 4.0) * 6.0 + time) * 4.0);
337 float aurora = sin(point.y * 16.0 + sin(point.x * 5.0 - time) * 4.0);
338 field = fault * 0.3 +
aurora * 0.32 +
fbm(point * 5.0 - time * 0.1) * 0.18;
340 float hand_a = exp(-abs(sin(angle - floor(time * 2.0) * 0.2)) * radius * 25.0);
341 float hand_b = exp(-abs(sin(angle + time * 0.31)) * radius * 34.0);
342 field = (hand_a + hand_b) * 0.5 + sin(radius * 33.0 - floor(time * 3.0)) * 0.28;
344 vec2
cell =
hex_cell((point + vec2(sin(time * 0.2), cos(time * 0.17)) * 0.03) * 10.0);
345 float honey = smoothstep(0.5, 0.16, length(
cell));
346 field = honey * 0.65 + sin(radius * (25.0 + bass * 17.0) - time * 5.0) * 0.28;
348 float web = sin(angle * 11.0 + sin(radius * 15.0 - time * 2.0) * 2.0);
349 field = pow(abs(web), 6.0) * 0.62 + sin(radius * (29.0 + bass * 17.0) - time * 7.0) * 0.3;
351 float helix_a = sin(angle * 5.0 - radius * 21.0 - time * 5.0);
352 float helix_b = cos(angle * 4.0 + radius * 15.0 - time * 3.0);
353 field = helix_a * 0.38 + helix_b * 0.3 +
fbm(point * 6.0 + time * 0.08) * 0.2;
355 float lotus = pow(max(cos(angle * 9.0 - radius * 13.0 + time * 2.0), 0.0), 5.0);
356 field = lotus * exp(-radius * 1.6) * 0.72;
357 field += sin(radius * (29.0 + bass * 20.0) - time * 7.0) * 0.28;
359 float tide = sin(point.x * 11.0 + sin(point.y * 8.0 + time) * 3.0);
360 tide *= cos(point.y * 13.0 - cos(point.x * 6.0 - time) * 3.0);
361 field = tide * 0.37 + exp(-radius * 2.4) * 0.3;
364 float facets = 1.0 - smoothstep(0.12, 0.28,
diamond.x +
diamond.y);
365 field = facets * 0.62 + sin(point.y * 25.0 + sin(point.x * 8.0 - time) * 4.0) * 0.27;
367 vec2 maze = abs(fract((
rotate_2d(0.24) * point) * 8.0) - 0.5);
368 float walls = 1.0 - smoothstep(0.04, 0.13, min(maze.x, maze.y));
369 field = walls * 0.62 + cos(angle * 8.0 + floor(radius * 10.0) * 1.7) * 0.25;
371 float spokes = pow(abs(sin(angle * 12.0 - radius * 18.0 + time * 2.0)), 8.0);
372 field = spokes * exp(-radius * 1.3) * 0.7;
373 field += sin(radius * (25.0 + bass * 22.0) - time * 7.0) * 0.3;
375 float well = sin(log(radius + 0.035) * (14.0 + bass * 7.0) - angle * 5.0 + time * 4.0);
376 field = well * 0.48 + exp(-radius * 5.0) * 0.5;
378 float crown = pow(abs(cos(angle * (13.0 + floor(treble * 7.0)) + time)), 12.0);
379 float ring = sin(radius * (37.0 + bass * 24.0) - time * 9.0);
380 field = crown * exp(-radius * 1.7) * 0.72 + ring * 0.32;
383 return field + (
fbm(point * 3.1 - vec2(0.0, time * 0.12)) - 0.5) * 0.12;
386vec2
cache_transform(vec2 uv, vec2 center,
float age,
float bass,
float middle,
float treble,
388 vec2 point = uv - center;
389 float radius = length(point) + 0.0001;
390 vec2 radial = point / radius;
391 float phase = radius * (13.0 + float(
EFFECT_ID % 8)) -
time_f * (2.0 + bass * 3.0) + age;
392 float wave = sin(phase);
393 float zoom = pow(max(0.958 - bass * 0.09, 0.35), age);
395#if EFFECT_ID % 5 == 0
397 point += radial *
wave * age * (0.004 + treble * 0.01);
398 point += flow * age * (0.006 + middle * 0.012);
399#elif EFFECT_ID % 5 == 1
400 point.x += sin(point.y * (12.0 + middle * 8.0) +
time_f + age) *
401 age * (0.006 + treble * 0.012);
402 point.y += cos(point.x * 10.0 -
time_f * 0.7 - age) *
403 age * (0.005 + bass * 0.01);
405#elif EFFECT_ID % 5 == 2
406 point += radial * sin(phase + atan(point.y, point.x) * 4.0) *
407 age * (0.008 + middle * 0.014);
409#elif EFFECT_ID % 5 == 3
410 point.x *= 1.0 + age * (0.009 + treble * 0.012);
412 point += vec2(
wave, -
wave) * age * 0.004;
414 vec2 folded = abs(point);
415 folded -= vec2(0.12 + bass * 0.08, 0.09 + middle * 0.07);
416 point = mix(point, sign(point + vec2(0.0001)) * folded, 0.35 + treble * 0.25);
418 point += radial *
wave * age * 0.006;
429 vec2 texel = 1.0 / resolution;
430 float aspect = resolution.x / resolution.y;
431 vec2 mouse_uv =
iMouse.xy / resolution;
432 vec2 center =
iMouse.z > 0.0 ? mouse_uv : vec2(0.5);
433 vec2 point = (tc - center) * vec2(aspect, 1.0);
435 float global_hue = 0.0;
437 global_hue = (mouse_uv.x - 0.5) * 3.0;
439 float bass = texture(spectrum0, 0.03).r;
440 float middle = texture(spectrum0, 0.22).r;
441 float treble = texture(spectrum0, 0.58).r;
442 float air = texture(spectrum0, 0.82).r;
445 float pixel = 2.0 / max(max(resolution.x, resolution.y), 360.0);
446 vec2 gradient = vec2(
effect_field(point + vec2(pixel, 0.0), bass, middle, treble) -
field,
449 vec3 surface_normal = normalize(vec3(-gradient * (0.16 +
amp_high * 0.05), 1.0));
452 sin(point.x * (11.0 +
float(
EFFECT_ID % 7)) +
time_f * (4.0 + bass * 3.0));
454 sin(point.y * (12.0 +
float(
EFFECT_ID % 6)) +
time_f * (3.5 + middle * 2.0));
455 float cross_ripple = sin((point.x + point.y) * (8.0 +
float(
EFFECT_ID % 5)) -
456 time_f * (2.5 + treble * 3.0));
457 vec2 wave_distortion =
458 vec2(ripple_x + cross_ripple * 0.6, ripple_y - cross_ripple * 0.6) *
459 (0.008 + bass * 0.018);
460 wave_distortion += surface_normal.xy * (0.012 +
amp_low * 0.025);
463 vec3 sharp = texture(samp, live_uv).rgb;
464 vec3 softened =
soft_sample(samp, live_uv, texel, 1.0 + middle * 3.0).rgb;
465 float dispersion = 0.003 + treble * 0.014;
466 vec3 refracted = vec3(texture(samp,
mirror_repeat(live_uv + surface_normal.xy * dispersion)).r,
468 texture(samp,
mirror_repeat(live_uv - surface_normal.xy * dispersion)).b);
469 vec3 live = mix(sharp, refracted, 0.48 +
amp_smooth * 0.15);
471 float luminance = dot(live, vec3(0.299, 0.587, 0.114));
473 vec3 scaled_live =
color_scale(live, live_palette, bass * 0.5 + middle * 0.3 + treble * 0.2);
474 vec3 mapped = 0.5 + 0.5 * cos(clamp(scaled_live, 0.0, 1.0) *
PI * 0.5 +
476 vec3 accumulated = mix(scaled_live, mapped * (0.45 +
luminance), 0.44);
478 pow(max(0.0, 1.0 - surface_normal.z), 2.0) * 0.7;
479 float total_weight = 1.0;
481 for (
int index = 0; index < 8; ++index) {
482 float age = float(index + 1);
488 cache_transform(tc, center, age, old_bass, old_middle, old_treble, surface_normal.xy);
491 old_bass * 0.45 + old_middle * 0.28 + old_treble * 0.17 + old_air * 0.10;
494 vec3 cache_scale = vec3(1.0 + age * 0.035 + old_middle * 0.22,
495 1.0 - age * 0.021 + old_bass * 0.12,
496 1.0 + age * 0.016 + old_air * 0.28);
497 history =
color_scale(history * max(cache_scale, vec3(0.05)), history_tint, old_energy);
498 float weight = pow(0.77, age);
499 accumulated += history * weight;
500 total_weight += weight;
503 accumulated /= total_weight;
504 float crest = pow(max(sin(
field * 19.0 -
time_f * 2.4), 0.0), 7.0);
507 accumulated = (accumulated - 0.5) * (1.08 +
amp_smooth * 0.28) + 0.5;
508 accumulated = mix(accumulated, vec3(1.0) - accumulated, smoothstep(0.91, 1.0,
amp_peak));
510 color = vec4(
tone_map(accumulated), texture(samp, live_uv).a);