터널 링
소실점으로 빨려 드는 링. 킥마다 굵어진다.
GLSL 소스
// Rings pulled into the vanishing point. Two rings every 4 beats — seamless. Kick and lows thicken them.
vec2 prim(vec2 uv) {
vec2 p = asp(uv);
float r = length(p);
float a = atan(p.y, p.x);
float depth = 0.35 / (r + 0.05) * (uParams.x / 16.0);
float z = depth + uBeat * 0.5 + uParams.y * 0.35 * sin(a * 3.0 + uBeat * TAU / 4.0);
float ring = abs(fract(z) - 0.5);
float w = 0.05 + uBass * 0.12 + uKick * 0.06;
float l = smoothstep(w, 0.0, ring) * smoothstep(0.02, 0.35, r);
return vec2(l, l);
}
공통 유니폼 계약(uBeat · uBass · uKick …)을 받는 vec2 prim(vec2 uv) 하나입니다. 출력은 luma 와 alpha 뿐입니다.