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
29 lines
1.2 KiB
Text
29 lines
1.2 KiB
Text
// BOX IRIS — the square sibling of the circular iris: a Chebyshev
|
|
// (square) distance field instead of a radial one, so the aperture
|
|
// opens as a square rather than a circle. FLIP closes deck A instead.
|
|
{
|
|
name: "Box Iris"
|
|
engine: "transition"
|
|
dials: [
|
|
{name: "SOFT", bind: "p0", default: 0.15},
|
|
{name: "FLIP", bind: "p1", default: 0.0},
|
|
{name: "DIP", bind: "p2", default: 0.0}
|
|
]
|
|
shader: draw.DrawVjFxDuo {
|
|
trans: fn(uv: vec2, t: float) -> vec4 {
|
|
let c2 = vec2((uv.x - 0.5) * self.aspect(), uv.y - 0.5)
|
|
let field = max(abs(c2.x), abs(c2.y))
|
|
let rmax = 0.5 * max(self.aspect(), 1.0)
|
|
let soft = 0.005 + self.user.x * 0.2
|
|
let flip = step(0.5, self.user.y)
|
|
let tt = mix(t, 1.0 - t, flip)
|
|
let edge = tt * (rmax + 2.0 * soft) - soft
|
|
let inside = smoothstep(edge + soft, edge - soft, field)
|
|
let cin = self.deck_b(uv).mix(self.deck_a(uv), flip)
|
|
let cout = self.deck_a(uv).mix(self.deck_b(uv), flip)
|
|
let c = cout.mix(cin, inside)
|
|
let dim = 1.0 - 4.0 * clamp(t, 0.0, 1.0) * (1.0 - clamp(t, 0.0, 1.0)) * self.user.z * 0.9
|
|
return vec4(c.xyz * dim, 1.0)
|
|
}
|
|
}
|
|
}
|