61 vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
62 vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
63 return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
128 vec3 pink = vec3(1.0, 0.15, 0.75);
129 vec3 blue = vec3(0.10, 0.55, 1.0);
130 vec3 green = vec3(0.10, 1.00, 0.45);
131 float ph = fract(t * 0.08);
132 vec3 k1 = mix(pink, blue, smoothstep(0.00, 0.33, ph));
133 vec3 k2 = mix(blue, green, smoothstep(0.33, 0.66, ph));
134 vec3 k3 = mix(green, pink, smoothstep(0.66, 1.00, ph));
135 float a = step(ph, 0.33);
136 float b = step(0.33, ph) * step(ph, 0.66);
137 float c = step(0.66, ph);
138 return normalize(a * k1 + b * k2 + c * k3) * 1.05;
147 c = pow(max(c, 0.0), vec3(0.95));
148 float l = dot(c, vec3(0.299, 0.587, 0.114));
149 c = mix(vec3(l), c, 0.9);
150 return clamp(c, 0.0, 1.0);
162 vec3 s00 = textureGrad(img, uv + ts * vec2(-1.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
163 vec3 s10 = textureGrad(img, uv + ts * vec2(0.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
164 vec3 s20 = textureGrad(img, uv + ts * vec2(1.0, -1.0), dFdx(uv), dFdy(uv)).rgb;
165 vec3 s01 = textureGrad(img, uv + ts * vec2(-1.0, 0.0), dFdx(uv), dFdy(uv)).rgb;
166 vec3 s11 = textureGrad(img, uv, dFdx(uv), dFdy(uv)).rgb;
167 vec3 s21 = textureGrad(img, uv + ts * vec2(1.0, 0.0), dFdx(uv), dFdy(uv)).rgb;
168 vec3 s02 = textureGrad(img, uv + ts * vec2(-1.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
169 vec3 s12 = textureGrad(img, uv + ts * vec2(0.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
170 vec3 s22 = textureGrad(img, uv + ts * vec2(1.0, 1.0), dFdx(uv), dFdy(uv)).rgb;
171 return (s00 + 2.0 * s10 + s20 + 2.0 * s01 + 4.0 * s11 + 2.0 * s21 + s02 + 2.0 * s12 + s22) / 16.0;
223 vec4 baseTex = texture(samp, tc);
224 vec2 uv = tc * 2.0 - 1.0;
228 float radius = sqrt(aspect * aspect + 1.0) + 0.5;
229 float glow = smoothstep(radius, radius - (0.25 +
amp_low * 0.3), r);
231 vec2 ar = vec2(aspect, 1.0);
233 float seg = 4.0 + (2.0 +
amp_mid * 2.0) * sin(
time_f * 0.33);
234 vec2 kUV =
reflectUV(tc, seg, m, aspect);
240 vec2 p = (kUV - m) * ar;
242 if (q.y > q.x) q = q.yx;
247 float ang = atan(q.y, q.x) + tz * 0.35 + 0.35 * sin(rD * 18.0 +
time_f * 0.6);
248 float k = fract((log(rD) - tz) / period);
249 float rw = exp(k * period);
250 vec2 pwrap = vec2(cos(ang), sin(ang)) * rw;
251 vec2 u0 = fract(pwrap / ar + m);
252 vec2 u1 = fract((pwrap * 1.045) / ar + m);
253 vec2 u2 = fract((pwrap * 0.955) / ar + m);
254 vec2 dir = normalize(pwrap + 1e-6);
255 vec2 off = dir * ((0.0015 +
amp_high * 0.002) + 0.001 * sin(
time_f * 1.3)) * vec2(1.0, 1.0 / aspect);
256 float vign = 1.0 - smoothstep(0.75, 1.2, length((tc - m) * ar));
257 vign = mix(0.9, (1.15 +
amp_smooth * 0.2), vign);
261 vec3 kaleidoRGB = vec3(rC.r, gC.g, bC.b);
262 float ring = smoothstep(0.0, 0.7, sin(log(rD + 1e-3) * 9.5 +
time_f * 1.2));
264 float pulse = 0.5 + (0.5 +
amp_rms * 0.3) * sin(
time_f * 2.0 + rD * 28.0 + k * 12.0);
265 vec3 outCol = kaleidoRGB;
266 outCol *= (0.75 + 0.25 * ring) * (0.85 + 0.15 * pulse) * vign;
267 vec3
bloom = outCol * outCol * 0.18 + pow(max(outCol - 0.6, 0.0), vec3(2.0)) * 0.12;
270 outCol = mix(outCol, baseCol,
pingPong(pulse *
PI, 5.0) * 0.18);
271 outCol = clamp(outCol, vec3(0.05), vec3(0.97));
272 vec3 finalRGB = mix(baseTex.rgb, outCol,
pingPong(glow *
PI, 5.0) * 0.8);
275 float _ab = clamp(
amp_peak, 0.0, 1.0);
276 float _abass = clamp(
amp_low, 0.0, 1.0);
277 finalRGB *= 1.0 + _ab * 0.6;
278 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);
281 color = vec4(finalRGB, baseTex.a);
vec2 rotateUV(vec2 uv, float angle, vec2 c, float aspect)
Evaluates rotateUV for this shader effect.
vec2 reflectUV(vec2 uv, float segments, vec2 c, float aspect)
Evaluates reflectUV for this shader effect.