トンネルリング
消失点へ吸い込まれるリング。キックのたびに太くなります。
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 だけです。