Squashed from work; the fine-grained history is under tag archive/work-2026-08-26: - vjfx: 104 new presets — the transition lane fills out and the screen family goes wide - vjfx: three lanes land — engine hooks + hold stage, the videomesh engine, and the audio picture - vj: the thumbnail pipeline becomes one honest machine, and effects go livecodable - vj: thumbnails become mp4 — hardware-coded sheets at measured-4K cells, and the bake stops racing the GPU - store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log - store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log - vj: the console grows real transports, and the deck stops lying about reverse - vj: reverse earns a memory, and the effects stop aging - fab: a 3D creation shell and the viewer built on it
41 lines
1.6 KiB
Text
41 lines
1.6 KiB
Text
// CIRCLE MAGNIFIER — a round lens patrols an elliptical path over the
|
|
// frame, bulging its patch of content outward with a bright rim on its edge.
|
|
{
|
|
name: "Circle Magnifier"
|
|
engine: "screen"
|
|
input0: "test"
|
|
|
|
p0: 0.5 p1: 0.5 p2: 0.5
|
|
dials: [
|
|
{name: "SIZE", bind: "p0", default: 0.5},
|
|
{name: "POWER", bind: "p1", default: 0.5},
|
|
{name: "DRIFT", bind: "p2", default: 0.5}
|
|
]
|
|
|
|
stages: [
|
|
{kind: "bloom", threshold: 0.6, strength: 1.05, levels: 2}
|
|
]
|
|
|
|
shader: draw.DrawVjFxScreen {
|
|
fx_color: fn(uv: vec2, content: vec4, cmix: float) -> vec4 {
|
|
let speed = 0.15 + 0.6 * self.user.z
|
|
let cx = 0.5 + 0.26 * cos(self.time_beat.x * speed)
|
|
let cy = 0.5 + 0.2 * sin(self.time_beat.x * speed * 1.3)
|
|
let center = vec2(cx, cy)
|
|
let radius = 0.08 + 0.2 * self.user.x
|
|
let d = uv - center
|
|
let r = length(d)
|
|
let inside = 1.0 - smoothstep(radius * 0.85, radius, r)
|
|
let mag = 1.0 + 2.6 * self.user.y
|
|
let rr = clamp(r / max(radius, 0.0001), 0.0, 1.0)
|
|
let bulge = pow(rr, 1.0 / mag)
|
|
let dir = d / max(r, 0.0001)
|
|
let lensed = center + dir * bulge * radius
|
|
let w = mix(uv, lensed, inside)
|
|
let tex = self.tex0.sample_as_bgra(clamp(w, vec2(0.0, 0.0), vec2(1.0, 1.0)))
|
|
let rim = smoothstep(radius * 0.88, radius, r) * (1.0 - smoothstep(radius, radius * 1.08, r))
|
|
let out = tex.xyz + vec3(1.0, 1.0, 1.0) * rim * 0.25
|
|
return vec4(out, 1.0)
|
|
}
|
|
}
|
|
}
|