132 vec3 pink = vec3(1.0, 0.15, 0.75);
133 vec3 blue = vec3(0.10, 0.55, 1.0);
134 vec3 green = vec3(0.10, 1.00, 0.45);
135 float ph = fract(t * 0.08);
136 vec3 k1 = mix(pink, blue, smoothstep(0.00, 0.33, ph));
137 vec3 k2 = mix(blue, green, smoothstep(0.33, 0.66, ph));
138 vec3 k3 = mix(green, pink, smoothstep(0.66, 1.00, ph));
139 float a = step(ph, 0.33);
140 float b = step(0.33, ph) * step(ph, 0.66);
141 float c = step(0.66, ph);
142 return normalize(a * k1 + b * k2 + c * k3) * 1.05;
166 vec3 s00 = textureGrad(img, uv + ts * vec2(-1.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
167 vec3 s10 = textureGrad(img, uv + ts * vec2(0.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
168 vec3 s20 = textureGrad(img, uv + ts * vec2(1.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
169 vec3 s01 = textureGrad(img, uv + ts * vec2(-1.0, 0.0), dFdx(uv), dFdy(uv)).rgb;
170 vec3 s11 = textureGrad(img, uv, dFdx(uv), dFdy(uv)).rgb;
171 vec3 s21 = textureGrad(img, uv + ts * vec2(1.0, 0.0), dFdx(uv), dFdy(uv)).rgb;
172 vec3 s02 = textureGrad(img, uv + ts * vec2(-1.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
173 vec3 s12 = textureGrad(img, uv + ts * vec2(0.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
174 vec3 s22 = textureGrad(img, uv + ts * vec2(1.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
175 return (s00 + 2.0 * s10 + s20 + 2.0 * s01 + 4.0 * s11 + 2.0 * s21 + s02 + 2.0 * s12 + s22) / 16.0;
238 float aAcc = clamp(
amp, 0.0, 20.0);
239 float aInst = clamp(
uamp, 0.0, 20.0);
240 float aMix = clamp(aAcc * 0.5 + aInst * 1.0, 0.0, 20.0);
241 float a01 = clamp(aMix / 6.0, 0.0, 1.0);
246 float tSpin =
time_f * mix(0.3, 1.8, a01);
247 float tSlow =
time_f * mix(0.2, 0.9, a01);
248 float tFast =
time_f * mix(0.8, 3.2, a01);
250 vec2 offset = tc - center;
251 float maxRadius = length(vec2(0.5, 0.5));
252 float radius = length(offset);
253 float normalizedRadius = radius / maxRadius;
254 float angle = atan(offset.y, offset.x);
256 float distortion = 0.25 + 0.75 * a01;
257 float distortedRadius = normalizedRadius + distortion * normalizedRadius * normalizedRadius;
258 distortedRadius = clamp(distortedRadius, 0.0, 1.0);
259 distortedRadius *= maxRadius;
261 vec2 distortedCoords = center + distortedRadius * vec2(cos(angle), sin(angle));
263 float modulatedTime =
pingPong(tSpin, 5.0);
264 angle += modulatedTime;
267 rotatedTC.x = cos(angle) * (distortedCoords.x - center.x)
268 - sin(angle) * (distortedCoords.y - center.y) + center.x;
269 rotatedTC.y = sin(angle) * (distortedCoords.x - center.x)
270 + cos(angle) * (distortedCoords.y - center.y) + center.y;
272 float warpSpeed = 0.05 + 0.25 * a01 + 0.2 * (aInst / (aInst + 1.0));
274 warpedCoords.x =
pingPong(rotatedTC.x + tSpin * warpSpeed, 1.0);
275 warpedCoords.y =
pingPong(rotatedTC.y + tSpin * warpSpeed, 1.0);
277 vec2 uvGlow = warpedCoords * 2.0 - 1.0;
279 float rGlow = length(uvGlow);
280 float radiusMax = sqrt(aspect * aspect + 1.0) + 0.5;
281 float glow = smoothstep(radiusMax, radiusMax - 0.25, rGlow);
284 vec2 ar = vec2(aspect, 1.0);
287 float seg = 4.0 + 2.0 * sin(tSlow * 0.33 + a01 * 2.0);
289 vec2 kUV =
reflectUV(warpedCoords, seg, m, aspect);
292 float foldZoom = 1.45 + 0.55 * sin(tSlow * 0.42 + a01 * 3.0);
293 kUV =
fractalFold(kUV, foldZoom, tFast, m, aspect);
294 kUV =
rotateUV(kUV, tSlow * 0.23 + a01 * 1.1, m, aspect);
297 vec2 p = (kUV - m) * ar;
299 if (q.y > q.x) q = q.yx;
301 float base = 1.82 + 0.18 * sin(tSlow * 0.2);
302 float period = log(base);
303 float tz = tSlow * 0.65;
306 float ang = atan(q.y, q.x) + tz * 0.35 + 0.35 * sin(rD * 18.0 + tFast * 0.6);
307 float k = fract((log(rD) - tz) / period);
308 float rw = exp(k * period);
309 vec2 pwrap = vec2(cos(ang), sin(ang)) * rw;
311 vec2 u0 = fract(pwrap / ar + m);
312 vec2 u1 = fract((pwrap * 1.045) / ar + m);
313 vec2 u2 = fract((pwrap * 0.955) / ar + m);
315 vec2 dir = normalize(pwrap + 1e-6);
316 vec2 off = dir * (0.0015 + 0.001 * sin(tFast * 1.3)) * vec2(1.0, 1.0 / aspect);
318 float vign = 1.0 - smoothstep(0.75, 1.2, length((warpedCoords - m) * ar));
319 vign = mix(0.9, (1.15 +
amp_smooth * 0.2), vign);
324 vec3 kaleidoRGB = vec3(rC.r, gC.g, bC.b);
326 float ring = smoothstep(0.0, 0.7, sin(log(rD + 1e-3) * 9.5 + tFast * 1.2));
327 float pulse = 0.5 + 0.5 * sin(tFast * 2.0 + rD * 28.0 + k * 12.0);
328 pulse *= mix(0.4, 1.4, a01);
330 vec3 outCol = kaleidoRGB;
331 outCol *= (0.75 + 0.25 * ring) * (0.85 + 0.15 * pulse) * vign;
333 vec3
bloom = outCol * outCol * 0.10
334 + pow(max(outCol - 0.6, 0.0), vec3(2.0)) * 0.06;
337 outCol = mix(outCol, baseColBlur, 0.18 + 0.3 * a01);
339 outCol = clamp(outCol, 0.0, 1.0);
341 vec4 baseTex = texture(samp, warpedCoords);
342 float mixAmt =
pingPong(glow *
PI, 5.0) * mix(0.4, 0.9, a01);
343 vec3 finalRGB = mix(baseTex.rgb, outCol, mixAmt);
345 finalRGB = clamp(finalRGB, 0.0, 1.0);
349 float _ab = clamp(
amp_peak, 0.0, 1.0);
350 float _abass = clamp(
amp_low, 0.0, 1.0);
351 finalRGB *= 1.0 + _ab * 0.6;
352 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);
355 color = vec4(finalRGB, baseTex.a);