makepad/apps/vj/resources/effects/171_crop.splash
Admin cb49b032df vjfx: 104 presets, engine hooks + hold stage, the videomesh engine, the audio picture, livecodable effects, and mp4 thumbnail sheets
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
2026-08-26 08:49:48 +02:00

33 lines
1.1 KiB
Text

// CROP — a hard inset window onto the frame; everything outside it goes
// to black, the classic letterbox/pillarbox crop. BIAS weights the crop
// toward top/bottom vs left/right.
{
name: "Crop"
engine: "screen"
input0: "test"
p0: 0.5 p1: 0.5 p2: 0.5
dials: [
{name: "CROP", bind: "p0", default: 0.5},
{name: "BIAS", bind: "p1", default: 0.5},
{name: "GLOW", bind: "p2", default: 0.5}
]
stages: [
{kind: "bloom", threshold: 0.55, strength: "1.1 * (0.25 + 1.5*p2)", levels: 2}
]
shader: draw.DrawVjFxScreen {
fx_color: fn(uv: vec2, content: vec4, cmix: float) -> vec4 {
let inset = 0.02 + 0.30 * self.user.x
let bias = self.user.y
let insetx = inset * (1.3 - bias)
let insety = inset * (0.3 + bias * 1.4)
let lo = vec2(insetx, insety)
let hi = vec2(1.0 - insetx, 1.0 - insety)
let inside = step(lo.x, uv.x) * step(uv.x, hi.x) * step(lo.y, uv.y) * step(uv.y, hi.y)
let tex = self.tex0.sample_as_bgra(uv)
return vec4(tex.xyz * inside, 1.0)
}
}
}