makepad/apps/vj/resources/effects/151_trans_add_fade.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

29 lines
1.1 KiB
Text

// ADD FADE — a crossfade that blows out additively through the middle:
// as deck B fades in, its light also pours on top of the mix (mid-fade
// only), then the transition lands clean on pure B. CURVE bends both the
// fade law and where the bloom peaks, BOOST sets the bloom's strength,
// DIP ducks through black just before it.
{
name: "Add Fade"
engine: "transition"
p0: 0.5
dials: [
{name: "CURVE", bind: "p0", default: 0.5},
{name: "BOOST", bind: "p1", default: 0.35},
{name: "DIP", bind: "p2", default: 0.0}
]
shader: draw.DrawVjFxDuo {
trans: fn(uv: vec2, t: float) -> vec4 {
let tt0 = clamp(t, 0.0, 1.0)
let curved = pow(tt0, pow(4.0, self.user.x * 2.0 - 1.0))
let a = self.deck_a(uv)
let b = self.deck_b(uv)
let base = a.xyz.mix(b.xyz, curved)
let mid = 4.0 * curved * (1.0 - curved)
let bloom = mid * self.user.y * 1.2
let dim = 1.0 - mid * self.user.z * 0.9
let c = (base + b.xyz * bloom) * dim
return vec4(min(c.x, 1.0), min(c.y, 1.0), min(c.z, 1.0), 1.0)
}
}
}