makepad/apps/vj/resources/effects/181_shuffle_h.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

39 lines
1.4 KiB
Text

// SHUFFLE H — horizontal strips shuffle sideways at a per-strip speed
// drawn fresh from a hash every beat; a rhythmic slice-and-scramble.
// The speed is quantised on floor(beat), never a running accumulator:
// each strip's speed is fixed for the whole beat and the shift resets
// to zero at the top of the next one.
{
name: "Shuffle H"
engine: "screen"
input0: "test"
p0: 0.5 p1: 0.5 p2: 0.5
dials: [
{name: "COUNT", bind: "p0", default: 0.5},
{name: "SPEED", bind: "p1", default: 0.5},
{name: "AMOUNT", 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 strips = mix(6.0, 24.0, self.user.x)
let idx = floor(uv.y * strips)
let beat_id = floor(self.time_beat.y)
let bphase = fract(self.time_beat.y)
let h = fract(sin(idx * 12.9898 + beat_id * 3.713 + 5.0) * 43758.5453)
let speed = (h - 0.5) * 2.0 * (0.3 + 1.4 * self.user.y)
let shift = speed * bphase
let w = vec2(fract(uv.x + shift), uv.y)
let tex = self.tex0.sample_as_bgra(w)
let base = self.tex0.sample_as_bgra(uv)
let amount = 0.3 + 0.7 * self.user.z
let out = base.xyz.mix(tex.xyz, amount)
return vec4(out, 1.0)
}
}
}