168 vec3 s00 = textureGrad(img, uv + ts * vec2(-1.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
169 vec3 s10 = textureGrad(img, uv + ts * vec2(0.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
170 vec3 s20 = textureGrad(img, uv + ts * vec2(1.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
171 vec3 s01 = textureGrad(img, uv + ts * vec2(-1.0, 0.0), dFdx(uv), dFdy(uv)).rgb;
172 vec3 s11 = textureGrad(img, uv, dFdx(uv), dFdy(uv)).rgb;
173 vec3 s21 = textureGrad(img, uv + ts * vec2(1.0, 0.0), dFdx(uv), dFdy(uv)).rgb;
174 vec3 s02 = textureGrad(img, uv + ts * vec2(-1.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
175 vec3 s12 = textureGrad(img, uv + ts * vec2(0.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
176 vec3 s22 = textureGrad(img, uv + ts * vec2(1.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
177 return (s00 + 2.0 * s10 + s20 + 2.0 * s01 + 4.0 * s11 + 2.0 * s21 + s02 + 2.0 * s12 + s22) / 16.0;
315 float a = clamp(
amp, 0.0, 1.0);
316 float ua = clamp(
uamp, 0.0, 1.0);
317 float aMix = clamp(
amp * 0.7 +
uamp * 1.3, 0.0, 4.0);
318 float a01 = clamp(aMix / 2.5, 0.0, 1.0);
321 vec2 ar = vec2(aspect, 1.0);
324 float tSlow = tBase * mix(0.2, 0.9, a01);
325 float tFast = tBase * mix(0.7, 3.5, a01);
328 : fract(vec2(0.37 + 0.11 * sin(tSlow * 0.63 +
seed),
329 0.42 + 0.13 * cos(tSlow * 0.57 +
seed * 2.0)));
333 vec2 center = vec2(0.5, 0.5);
334 float radius = length(tc0 - center);
337 float rippleSpeed = 5.0 * (1.0 + 2.0 * a01);
338 float rippleAmplitude = 0.03 * (0.5 + 1.5 * a01);
339 float rippleWavelength = 10.0;
340 float twistStrength = 1.0 + 4.0 * a01;
342 float ripple = sin(tc0.x * rippleWavelength + tFast * rippleSpeed) * rippleAmplitude;
343 ripple += sin(tc0.y * rippleWavelength + tFast * rippleSpeed) * rippleAmplitude;
346 float angleTwist = twistStrength * (radius - 1.0) + tSlow;
347 float cosA = cos(angleTwist);
348 float sinA = sin(angleTwist);
349 mat2 rotationMatrix = mat2(cosA, -sinA, sinA, cosA);
350 vec2 twistedTC = rotationMatrix * (tc0 - center) + center;
352 float mixRT = 0.5 + 0.35 * a01;
353 vec2 tcRT = mix(rippleTC, twistedTC, mixRT);
356 float ringMirrorSpiral;
357 vec2 spiralTC =
spiralWarp(tcRT, tBase, a01, ringMirrorSpiral);
359 vec4 baseTex = texture(samp, spiralTC);
362 vec2 uvForGlow = spiralTC * 2.0 - 1.0;
363 uvForGlow.x *= aspect;
364 float rGlow =
pingPong(sin(length(uvForGlow) * tSlow), 5.0);
365 float radiusMax = sqrt(aspect * aspect + 1.0) + 0.5;
366 float glow = smoothstep(radiusMax, radiusMax - 0.25, rGlow);
367 glow *= (0.8 + 0.4 * ringMirrorSpiral);
371 float speedScale = 1.0 + 2.0 * a01 + 3.0 * ua;
373 float speedR = 5.0 * speedScale;
374 float speedG = 6.5 * speedScale;
375 float speedB = 4.0 * speedScale;
376 float ampR = 0.03 * (0.7 + 0.6 * a01);
377 float ampG = 0.025 * (0.7 + 0.6 * a01);
378 float ampB = 0.035 * (0.7 + 0.6 * a01);
383 float rR = sin(uv.x * waveR + tFast * speedR) * ampR
384 + sin(uv.y * waveR * 0.8 + tFast * speedR * 1.2) * ampR;
385 float rG = sin(uv.x * waveG * 1.5 + tFast * speedG) * ampG
386 + sin(uv.y * waveG * 0.3 + tFast * speedG * 0.7) * ampG;
387 float rB = sin(uv.x * waveB * 0.5 + tFast * speedB) * ampB
388 + sin(uv.y * waveB * 1.7 + tFast * speedB * 1.3) * ampB;
390 vec2 tcR = uv + vec2(rR, rR);
391 vec2 tcG = uv + vec2(rG, -0.5 * rG);
392 vec2 tcB = uv + vec2(0.3 * rB, rB);
394 vec3 pats[4] = vec3[](vec3(1,0,1), vec3(0,1,0), vec3(1,0,0), vec3(0,0,1));
396 int pidx = int(mod(floor(tBase * pspd +
seed * 4.0), 4.0));
397 vec3
mir = pats[pidx];
403 float fallR = smoothstep(0.55, 0.0, length(dR));
404 float fallG = smoothstep(0.55, 0.0, length(dG));
405 float fallB = smoothstep(0.55, 0.0, length(dB));
407 float sw = (0.12 + 0.38 * ua + 0.25 * a);
408 vec2 tangR =
rot2(normalize(dR + 1e-4), 1.5707963);
409 vec2 tangG =
rot2(normalize(dG + 1e-4), 1.5707963);
410 vec2 tangB =
rot2(normalize(dB + 1e-4), 1.5707963);
412 vec2 airR = tangR * sw * fallR * (0.06 + 0.22 * a) * (0.6 + 0.4 * cos(uv.y * 40.0 + tFast * 3.0 +
seed));
413 vec2 airG = tangG * sw * fallG * (0.06 + 0.22 * a) * (0.6 + 0.4 * cos(uv.y * 38.0 + tFast * 3.3 +
seed * 1.7));
414 vec2 airB = tangB * sw * fallB * (0.06 + 0.22 * a) * (0.6 + 0.4 * cos(uv.y * 42.0 + tFast * 2.9 +
seed * 0.9));
416 vec2 jit = (
h2(uv * vec2(233.3, 341.9) + tFast +
seed) - 0.5)
417 * (0.0006 + 0.004 * ua);
423 vec2 fR = vec2(
mir.r > 0.5 ? 1.0 - tcR.x : tcR.x, tcR.y);
424 vec2 fG = vec2(
mir.g > 0.5 ? 1.0 - tcG.x : tcG.x, tcG.y);
425 vec2 fB = vec2(
mir.b > 0.5 ? 1.0 - tcB.x : tcB.x, tcB.y);
427 float seg = 4.0 + 2.0 * sin(tSlow * 0.33 + a01 * 2.0);
428 vec2 kUV =
reflectUV(spiralTC, seg, m, aspect);
430 float foldZoom = 1.45 + 0.55 * sin(tSlow * 0.42 + a01 * 3.0);
431 kUV =
fractalFold(kUV, foldZoom, tFast, m, aspect);
432 kUV =
rotateUV(kUV, tSlow * 0.23 + a01 * 1.1, m, aspect);
435 vec2 p = (kUV - m) * ar;
437 if (q.y > q.x) q = q.yx;
439 float base = 1.82 + 0.18 *
pingPong(sin(tSlow * 0.2) * (
PI * tSlow), 5.0);
440 float period = log(base) *
pingPong(tSlow *
PI, 5.0);
441 float tz = tSlow * 0.65;
444 float ang = atan(q.y, q.x) + tz * 0.35
445 + 0.35 * sin(rD * 18.0 + tFast * 0.6);
446 float k = fract((log(rD) - tz) / period);
447 float rw = exp(k * period);
448 vec2 pwrap = vec2(cos(ang), sin(ang)) * rw;
450 vec2 u0 = fract(pwrap / ar + m);
451 vec2 u1 = fract((pwrap * 1.045) / ar + m);
452 vec2 u2 = fract((pwrap * 0.955) / ar + m);
454 vec2 dirK = normalize(pwrap + 1e-6);
455 vec2 off = dirK * (0.0015 + 0.001 * sin(tFast * 1.3)) * vec2(1.0, 1.0 / aspect);
457 float vign = 1.0 - smoothstep(0.75, 1.2, length((spiralTC - m) * ar));
458 vign = mix(0.9, (1.15 +
amp_smooth * 0.2), vign) * (0.8 + 0.3 * ringMirrorSpiral);
460 vec2 sR = mix(u0, fR, 0.6);
461 vec2 sG = mix(u1, fG, 0.6);
462 vec2 sB = mix(u2, fB, 0.6);
468 vec3 kaleidoRGB = vec3(rC.r, gC.g, bC.b);
470 float ring = smoothstep(0.0, 0.7, sin(log(rD + 1e-3) * 9.5 + tFast * 1.2));
471 ring = ring *
pingPong(tSlow *
PI, 5.0) * (0.7 + 0.5 * ringMirrorSpiral);
472 float pulse = 0.5 + 0.5 * sin(tFast * 2.0 + rD * 28.0 + k * 12.0);
473 pulse *= mix(0.4, 1.4, a01);
475 vec3 outCol = kaleidoRGB;
476 outCol *= (0.75 + 0.25 * ring) * (0.85 + 0.15 * pulse) * vign;
478 vec3
bloom = outCol * outCol * 0.10
479 + pow(max(outCol - 0.6, 0.0), vec3(2.0)) * 0.06;
481 float pulseAdd = 0.004 * (0.5 + 0.5 * sin(tFast * 3.7 +
seed));
483 outCol += pulseAdd * ua;
485 outCol = clamp(outCol, vec3(0.0), vec3(1.0));
488 vec3 finalRGB = mix(baseTex.rgb, outCol,
pingPong(glow *
PI, 5.0) * (0.6 + 0.3 * a01));
490 finalRGB = clamp(finalRGB, 0.0, 1.0);
494 float _ab = clamp(
amp_peak, 0.0, 1.0);
495 float _abass = clamp(
amp_low, 0.0, 1.0);
496 finalRGB *= 1.0 + _ab * 0.6;
497 finalRGB = mix(finalRGB, finalRGB * vec3(1.0 + _abass * 0.3, 1.0 - _abass * 0.15, 1.0 + clamp(
amp_high, 0.0, 1.0) * 0.25), _ab);
500 color = vec4(finalRGB, baseTex.a);