makepad/apps/vj/resources/effects/145_trans_multiply.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.2 KiB
Text

// MULTIPLY — deck B darkens deck A wherever B itself is dark: the
// classic ink/paint combine, result = a*b (the inverse logic of the
// additive family at 109/112). GAIN pushes B's darkening hotter before
// the multiply, CURVE bends the fader response, KEY narrows the darken
// to B's own shadows only.
{
name: "Multiply"
engine: "transition"
engage: "ramp"
p1: 0.5
dials: [
{name: "GAIN", bind: "p0", default: 0.5},
{name: "CURVE", bind: "p1", default: 0.5},
{name: "KEY", bind: "p2", default: 0.0}
]
shader: draw.DrawVjFxDuo {
trans: fn(uv: vec2, t: float) -> vec4 {
let a = self.deck_a(uv)
let b = self.deck_b(uv)
let gain = 0.5 + self.user.x * 1.5
let tt = pow(clamp(t, 0.0, 1.0), pow(4.0, self.user.y * 2.0 - 1.0))
let mult = a.xyz * clamp(b.xyz * gain, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0))
let luma = dot(b.xyz, vec3(0.2126, 0.7152, 0.0722))
let gate = mix(1.0, 1.0 - smoothstep(0.25, 0.75, luma), self.user.z)
let composite = a.xyz.mix(mult, tt * gate)
return vec4(composite.x, composite.y, composite.z, 1.0)
}
}
}