makepad/apps/vj/resources/effects/204_tint.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

51 lines
1.8 KiB
Text

// TINT — the picture is recoloured into a single hue: AMOUNT dials how
// much of the original survives, LUMA how much the tint still shades by
// brightness versus sitting flat, GLOW lifts the tint's own brightness.
{
name: "Tint"
engine: "screen"
seed: 204
input0: "test"
speed: 1.0
beat_pulse: 0.4
beat_rate: 1.0
bar_beats: 4
glow: 1.0
// PERFORMANCE DIALS — mid-knob = the stock look, exact.
p0: 0.5 p1: 0.5 p2: 0.5
dials: [
{name: "AMOUNT", bind: "p0", default: 0.5},
{name: "LUMA", bind: "p1", default: 0.5},
{name: "GLOW", bind: "p2", default: 0.5}
]
color_bg: #x03040a
color_a: #xff8844
color_b: #xff3a86
color_c: #xfff0d0
stages: [
{kind: "bloom", threshold: 0.6, strength: 1.0, levels: 2}
]
// THE LOOK LIVES HERE: the whole frame is this function. col_a is the
// tint colour; the picture crossfades into it, luma-shaded or flat.
// Inputs: uv, content = input0 at uv, cmix = pre-gated content
// strength. Signals: self.time_beat (time, beat, phase, pulse),
// self.sig (bar, bpm, energy, dt), self.user (p0..p3),
// self.col_a/b/c/bg, self.fog (density, glow, content, -).
shader: draw.DrawVjFxScreen {
fx_color: fn(uv: vec2, content: vec4, cmix: float) -> vec4 {
let luma = dot(content.xyz, vec3(0.299, 0.587, 0.114))
let amount = clamp(0.2 + 1.6 * self.user.x, 0.0, 1.0)
let lumamix = clamp(self.user.y, 0.0, 1.0)
let glow = 0.5 + 1.5 * self.user.z
let flat = self.col_a.xyz
let shaded = self.col_a.xyz * (0.3 + 1.4 * luma)
let tint = flat.mix(shaded, lumamix) * glow
let rgb = content.xyz.mix(tint, amount)
return vec4(clamp(rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0)), 1.0)
}
}
}