The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
A grading library in the shader prelude, and twelve looks written on it
Jareerd45e736e5b8d
diff --git a/engine/crates/concat-effects/examples/previews.rs b/engine/crates/concat-effects/examples/previews.rsnew file mode 100644index 00000000..0e9c1b78--- /dev/null+++ b/engine/crates/concat-effects/examples/previews.rs@@ -0,0 +1,70 @@+// SPDX-License-Identifier: AGPL-3.0-or-later+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors++//! Renders every look's preview still: the package's own FFmpeg chain at+//! its defaults, run over one reference picture, so the card in the Library+//! shows the real look and not a guess at it.+//!+//! ```text+//! cargo run -p concat-effects --example previews -- <still> <out dir> [id...]+//! ```+//!+//! With no ids, every filter package is rendered; the file is named after+//! the id without its namespace, `concat.golden-hour` as `golden-hour.jpg`.+//! Needs `ffmpeg` on the path.++use std::path::PathBuf;+use std::process::Command;++use concat_effects::{At, Catalogue, Kind};++fn main() {+ let mut args = std::env::args().skip(1);+ let (Some(still), Some(out)) = (args.next(), args.next()) else {+ eprintln!("usage: previews <still> <out dir> [id...]");+ std::process::exit(2);+ };+ let only: Vec<String> = args.collect();+ let out = PathBuf::from(out);+ std::fs::create_dir_all(&out).expect("out dir");++ let mut failed = 0;+ for package in Catalogue::builtin().of_kind(Kind::Filter) {+ let id = package.id();+ if !only.is_empty() && !only.iter().any(|want| want == id) {+ continue;+ }+ let chain = match package.ffmpeg_fragment(&package.params_at(At::Default), 0) {+ Ok(Some(chain)) => chain,+ Ok(None) => {+ eprintln!("{id}: no ffmpeg chain, skipped");+ continue;+ }+ Err(error) => {+ eprintln!("{id}: {error}");+ failed += 1;+ continue;+ }+ };+ let name = id.rsplit('.').next().unwrap_or(id);+ let target = out.join(format!("{name}.jpg"));+ let status = Command::new("ffmpeg")+ .args(["-y", "-loglevel", "error", "-i", &still, "-vf", &chain, "-q:v", "3"])+ .arg(&target)+ .status();+ match status {+ Ok(status) if status.success() => println!("{id} -> {}", target.display()),+ Ok(status) => {+ eprintln!("{id}: ffmpeg exited with {status}\n chain: {chain}");+ failed += 1;+ }+ Err(error) => {+ eprintln!("{id}: could not run ffmpeg: {error}");+ failed += 1;+ }+ }+ }+ if failed > 0 {+ std::process::exit(1);+ }+}diff --git a/engine/crates/concat-effects/packages/concat.adjust/effect.wgsl b/engine/crates/concat-effects/packages/concat.adjust/effect.wgslindex 6e1b9d8a..804e05c3 100644--- a/engine/crates/concat-effects/packages/concat.adjust/effect.wgsl+++ b/engine/crates/concat-effects/packages/concat.adjust/effect.wgsl@@ -14,27 +14,6 @@ struct Params {fade: f32,}-fn kelvin(k: f32) -> vec3<f32> {- let t = clamp(k, 1000.0, 40000.0) / 100.0;- var r: f32;- var g: f32;- var b: f32;- if (t <= 66.0) {- r = 1.0;- g = clamp((99.4708 * log(t) - 161.1196) / 255.0, 0.0, 1.0);- if (t <= 19.0) {- b = 0.0;- } else {- b = clamp((138.5177 * log(t - 10.0) - 305.0448) / 255.0, 0.0, 1.0);- }- } else {- r = clamp(329.6987 * pow(t - 60.0, -0.1332) / 255.0, 0.0, 1.0);- g = clamp(288.1222 * pow(t - 60.0, -0.0755) / 255.0, 0.0, 1.0);- b = 1.0;- }- return vec3<f32>(r, g, b);-}-// The manual colour panel, in the order a colourist works: exposure and// balance, then tone, then the edge and the frame.fn effect(uv: vec2<f32>) -> vec4<f32> {@@ -46,7 +25,7 @@ fn effect(uv: vec2<f32>) -> vec4<f32> {c = c * exp2(params.exposure) + vec3<f32>(params.brightness / 100.0 * 0.5);// White balance about daylight, and green to magenta.- c = c * (kelvin(params.temperature) / kelvin(6500.0));+ c = white_balance(c, params.temperature);c.g = c.g - params.tint / 100.0 * 0.25;// Contrast about middle grey, saturation about luminance.diff --git a/engine/crates/concat-effects/packages/concat.bronze/effect.toml b/engine/crates/concat-effects/packages/concat.bronze/effect.tomlnew file mode 100644index 00000000..1668ed41--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.bronze/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.bronze"+name = "Bronze"+kind = "filter"+category = "Retro"+order = 31+intensity = "tone"+description = "Sepia that keeps its contrast, so it reads as old film rather than a brown wash."++[[param]]+key = "tone"+label = "Tone"+min = 0+max = 100+default = 80+step = 1+unit = "%"++[[param]]+key = "contrast"+label = "Contrast"+min = 0+max = 100+default = 30+step = 1+unit = "%"++[ffmpeg]+chain = "hue=s={fixed(1 - tone / 100 * 0.9, 3)},colorbalance=rm={fixed(tone / 100 * 0.12, 3)}:gm={fixed(tone / 100 * 0.04, 3)}:bm={fixed(0 - tone / 100 * 0.12, 3)},eq=contrast={fixed(1 + contrast / 100 * 0.3, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.bronze/effect.wgsl b/engine/crates/concat-effects/packages/concat.bronze/effect.wgslnew file mode 100644index 00000000..1896cd93--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.bronze/effect.wgsl@@ -0,0 +1,11 @@+struct Params { tone: f32, contrast: f32 }++// Nearly grey, then bronze through the middle, then the curve back.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let tone = params.tone / 100.0;+ var out = saturation(c.rgb, 1.0 - tone * 0.9);+ out = tint_midtones(out, vec3<f32>(0.12, 0.04, -0.12), tone);+ out = contrast(out, 1.0 + params.contrast / 100.0 * 0.3);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.bronze/fixtures.toml b/engine/crates/concat-effects/packages/concat.bronze/fixtures.tomlnew file mode 100644index 00000000..ac8e552b--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.bronze/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "hue=s=0.280,colorbalance=rm=0.096:gm=0.032:bm=-0.096,eq=contrast=1.090"++[[case]]+name = "minimum"+at = "min"+chain = "hue=s=1.000,colorbalance=rm=0.000:gm=0.000:bm=0.000,eq=contrast=1.000"++[[case]]+name = "maximum"+at = "max"+chain = "hue=s=0.100,colorbalance=rm=0.120:gm=0.040:bm=-0.120,eq=contrast=1.300"diff --git a/engine/crates/concat-effects/packages/concat.clean/effect.toml b/engine/crates/concat-effects/packages/concat.clean/effect.tomlnew file mode 100644index 00000000..00b2eb83--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.clean/effect.toml@@ -0,0 +1,23 @@+[effect]+id = "concat.clean"+name = "Clean"+kind = "filter"+category = "Everyday"+order = 12+intensity = "amount"+description = "Barely there: neutral balance, a little contrast, colour left honest. What a talking head wants."++[[param]]+key = "amount"+label = "Amount"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "eq=contrast={fixed(1 + amount / 100 * 0.16, 3)}:saturation={fixed(1 + amount / 100 * 0.12, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.clean/effect.wgsl b/engine/crates/concat-effects/packages/concat.clean/effect.wgslnew file mode 100644index 00000000..14d3c1e4--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.clean/effect.wgsl@@ -0,0 +1,10 @@+struct Params { amount: f32 }++// The quiet one: a gentle curve and a touch more colour.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let amount = params.amount / 100.0;+ var out = s_curve(c.rgb, amount * 0.35);+ out = saturation(out, 1.0 + amount * 0.12);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.clean/fixtures.toml b/engine/crates/concat-effects/packages/concat.clean/fixtures.tomlnew file mode 100644index 00000000..dc28130c--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.clean/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "eq=contrast=1.080:saturation=1.060"++[[case]]+name = "minimum"+at = "min"+chain = "eq=contrast=1.000:saturation=1.000"++[[case]]+name = "maximum"+at = "max"+chain = "eq=contrast=1.160:saturation=1.120"diff --git a/engine/crates/concat-effects/packages/concat.cool-blue/effect.toml b/engine/crates/concat-effects/packages/concat.cool-blue/effect.tomlnew file mode 100644index 00000000..b1a0ffc7--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.cool-blue/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.cool-blue"+name = "Cool Blue"+kind = "filter"+category = "Cinematic"+order = 21+intensity = "chill"+description = "Blue in the shadows and midtones, the highlights left neutral, contrast up. Cities at dusk."++[[param]]+key = "chill"+label = "Chill"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "contrast"+label = "Contrast"+min = 0+max = 100+default = 30+step = 1+unit = "%"++[ffmpeg]+chain = "colorbalance=bs={fixed(chill / 100 * 0.25, 3)}:rs={fixed(0 - chill / 100 * 0.08, 3)}:bm={fixed(chill / 100 * 0.12, 3)},eq=contrast={fixed(1 + contrast / 100 * 0.4, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.cool-blue/effect.wgsl b/engine/crates/concat-effects/packages/concat.cool-blue/effect.wgslnew file mode 100644index 00000000..0ab7a47e--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.cool-blue/effect.wgsl@@ -0,0 +1,11 @@+struct Params { chill: f32, contrast: f32 }++// The three-way version of Cool: blue where it is dark, not everywhere.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let chill = params.chill / 100.0;+ var out = split_tone(c.rgb, vec3<f32>(-0.08, 0.0, 0.25), vec3<f32>(0.0), chill);+ out = tint_midtones(out, vec3<f32>(0.0, 0.0, 0.12), chill);+ out = contrast(out, 1.0 + params.contrast / 100.0 * 0.4);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.cool-blue/fixtures.toml b/engine/crates/concat-effects/packages/concat.cool-blue/fixtures.tomlnew file mode 100644index 00000000..fac2084b--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.cool-blue/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "colorbalance=bs=0.150:rs=-0.048:bm=0.072,eq=contrast=1.120"++[[case]]+name = "minimum"+at = "min"+chain = "colorbalance=bs=0.000:rs=0.000:bm=0.000,eq=contrast=1.000"++[[case]]+name = "maximum"+at = "max"+chain = "colorbalance=bs=0.250:rs=-0.080:bm=0.120,eq=contrast=1.400"diff --git a/engine/crates/concat-effects/packages/concat.cool/effect.wgsl b/engine/crates/concat-effects/packages/concat.cool/effect.wgslindex b0834a89..5b9577d6 100644--- a/engine/crates/concat-effects/packages/concat.cool/effect.wgsl+++ b/engine/crates/concat-effects/packages/concat.cool/effect.wgsl@@ -2,29 +2,8 @@ struct Params { temperature: f32 }// Colour temperature as a white balance shift: the picture as if it were// lit at `temperature` kelvin while the camera was set for daylight.-fn kelvin(k: f32) -> vec3<f32> {- let t = clamp(k, 1000.0, 40000.0) / 100.0;- var r: f32;- var g: f32;- var b: f32;- if (t <= 66.0) {- r = 1.0;- g = clamp((99.4708 * log(t) - 161.1196) / 255.0, 0.0, 1.0);- if (t <= 19.0) {- b = 0.0;- } else {- b = clamp((138.5177 * log(t - 10.0) - 305.0448) / 255.0, 0.0, 1.0);- }- } else {- r = clamp(329.6987 * pow(t - 60.0, -0.1332) / 255.0, 0.0, 1.0);- g = clamp(288.1222 * pow(t - 60.0, -0.0755) / 255.0, 0.0, 1.0);- b = 1.0;- }- return vec3<f32>(r, g, b);-}fn effect(uv: vec2<f32>) -> vec4<f32> {let c = sample(uv);- let tint = kelvin(params.temperature) / kelvin(6500.0);- return vec4<f32>(clamp(c.rgb * tint, vec3<f32>(0.0), vec3<f32>(1.0)), c.a);+ return vec4<f32>(clamp01(white_balance(c.rgb, params.temperature)), c.a);}diff --git a/engine/crates/concat-effects/packages/concat.fresh/effect.toml b/engine/crates/concat-effects/packages/concat.fresh/effect.tomlnew file mode 100644index 00000000..c20f124d--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.fresh/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.fresh"+name = "Fresh"+kind = "filter"+category = "Everyday"+order = 10+intensity = "pop"+description = "Brighter and richer, with a breath of mint in the highlights: daylight footage made to pop."++[[param]]+key = "pop"+label = "Pop"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[[param]]+key = "brightness"+label = "Brightness"+min = 0+max = 100+default = 40+step = 1+unit = "%"++[ffmpeg]+chain = "eq=brightness={fixed(brightness / 100 * 0.12, 3)}:saturation={fixed(1 + pop / 100 * 0.5, 3)},colorbalance=gh={fixed(pop / 100 * 0.08, 3)}:bh={fixed(pop / 100 * 0.04, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.fresh/effect.wgsl b/engine/crates/concat-effects/packages/concat.fresh/effect.wgslnew file mode 100644index 00000000..87b7cdac--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.fresh/effect.wgsl@@ -0,0 +1,11 @@+struct Params { pop: f32, brightness: f32 }++// Brighter, richer, a mint cast in the highlights.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let pop = params.pop / 100.0;+ var out = c.rgb + vec3<f32>(params.brightness / 100.0 * 0.12);+ out = saturation(out, 1.0 + pop * 0.5);+ out = split_tone(out, vec3<f32>(0.0), vec3<f32>(0.0, 0.08, 0.04), pop);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.fresh/fixtures.toml b/engine/crates/concat-effects/packages/concat.fresh/fixtures.tomlnew file mode 100644index 00000000..44d3c888--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.fresh/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "eq=brightness=0.048:saturation=1.250,colorbalance=gh=0.040:bh=0.020"++[[case]]+name = "minimum"+at = "min"+chain = "eq=brightness=0.000:saturation=1.000,colorbalance=gh=0.000:bh=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "eq=brightness=0.120:saturation=1.500,colorbalance=gh=0.080:bh=0.040"diff --git a/engine/crates/concat-effects/packages/concat.golden-hour/effect.toml b/engine/crates/concat-effects/packages/concat.golden-hour/effect.tomlnew file mode 100644index 00000000..55faf4bd--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.golden-hour/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.golden-hour"+name = "Golden Hour"+kind = "filter"+category = "Everyday"+order = 14+intensity = "glow"+description = "Late-afternoon light: warm balance, orange in the highlights, a whisper of magenta in the shadows, blacks lifted."++[[param]]+key = "glow"+label = "Glow"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[[param]]+key = "warmth"+label = "Warmth"+min = 3500+max = 6500+default = 4600+step = 50+unit = "K"++[ffmpeg]+chain = "colortemperature=temperature={round(warmth)},colorbalance=rh={fixed(glow / 100 * 0.15, 3)}:gh={fixed(glow / 100 * 0.05, 3)}:rs={fixed(glow / 100 * 0.06, 3)}:bs={fixed(glow / 100 * 0.04, 3)},curves=all='0/{fixed(glow / 100 * 0.04, 3)} 1/1'"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.golden-hour/effect.wgsl b/engine/crates/concat-effects/packages/concat.golden-hour/effect.wgslnew file mode 100644index 00000000..574906ef--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.golden-hour/effect.wgsl@@ -0,0 +1,11 @@+struct Params { glow: f32, warmth: f32 }++// White balance toward candlelight, then the split tone the hour has.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let glow = params.glow / 100.0;+ var out = white_balance(c.rgb, params.warmth);+ out = split_tone(out, vec3<f32>(0.06, 0.0, 0.04), vec3<f32>(0.15, 0.05, 0.0), glow);+ out = fade(out, glow * 0.04);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.golden-hour/fixtures.toml b/engine/crates/concat-effects/packages/concat.golden-hour/fixtures.tomlnew file mode 100644index 00000000..ee465dec--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.golden-hour/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "colortemperature=temperature=4600,colorbalance=rh=0.075:gh=0.025:rs=0.030:bs=0.020,curves=all='0/0.020 1/1'"++[[case]]+name = "minimum"+at = "min"+chain = "colortemperature=temperature=3500,colorbalance=rh=0.000:gh=0.000:rs=0.000:bs=0.000,curves=all='0/0.000 1/1'"++[[case]]+name = "maximum"+at = "max"+chain = "colortemperature=temperature=6500,colorbalance=rh=0.150:gh=0.050:rs=0.060:bs=0.040,curves=all='0/0.040 1/1'"diff --git a/engine/crates/concat-effects/packages/concat.mono/effect.toml b/engine/crates/concat-effects/packages/concat.mono/effect.tomlnew file mode 100644index 00000000..4d8015b5--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.mono/effect.toml@@ -0,0 +1,37 @@+[effect]+id = "concat.mono"+name = "Mono"+kind = "filter"+category = "Retro"+order = 32+intensity = "contrast"+description = "Black and white through a coloured filter: red darkens skies and lightens skin, green does the reverse."++[[param]]+key = "colour"+label = "Colour filter"+min = -100+max = 100+default = 40+step = 1+unit = "%"++[[param]]+key = "contrast"+label = "Contrast"+min = 0+max = 100+default = 40+step = 1+unit = "%"++[ffmpeg]+let = [+ "r = 0.3 + 0.35 * colour / 100",+ "b = 0.11 - 0.05 * colour / 100",+ "g = 1 - r - b",+]+chain = "colorchannelmixer=rr={fixed(r, 3)}:rg={fixed(g, 3)}:rb={fixed(b, 3)}:gr={fixed(r, 3)}:gg={fixed(g, 3)}:gb={fixed(b, 3)}:br={fixed(r, 3)}:bg={fixed(g, 3)}:bb={fixed(b, 3)},eq=contrast={fixed(1 + contrast / 100 * 0.4, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.mono/effect.wgsl b/engine/crates/concat-effects/packages/concat.mono/effect.wgslnew file mode 100644index 00000000..d795d410--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.mono/effect.wgsl@@ -0,0 +1,12 @@+struct Params { colour: f32, contrast: f32 }++// The channel weights slide from a green filter to a red one.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let f = params.colour / 100.0;+ let r = 0.3 + 0.35 * f;+ let b = 0.11 - 0.05 * f;+ var out = mono(c.rgb, vec3<f32>(r, 1.0 - r - b, b));+ out = contrast(out, 1.0 + params.contrast / 100.0 * 0.4);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.mono/fixtures.toml b/engine/crates/concat-effects/packages/concat.mono/fixtures.tomlnew file mode 100644index 00000000..86d3f1e7--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.mono/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "colorchannelmixer=rr=0.440:rg=0.470:rb=0.090:gr=0.440:gg=0.470:gb=0.090:br=0.440:bg=0.470:bb=0.090,eq=contrast=1.160"++[[case]]+name = "minimum"+at = "min"+chain = "colorchannelmixer=rr=-0.050:rg=0.890:rb=0.160:gr=-0.050:gg=0.890:gb=0.160:br=-0.050:bg=0.890:bb=0.160,eq=contrast=1.000"++[[case]]+name = "maximum"+at = "max"+chain = "colorchannelmixer=rr=0.650:rg=0.290:rb=0.060:gr=0.650:gg=0.290:gb=0.060:br=0.650:bg=0.290:bb=0.060,eq=contrast=1.400"diff --git a/engine/crates/concat-effects/packages/concat.moody/effect.toml b/engine/crates/concat-effects/packages/concat.moody/effect.tomlnew file mode 100644index 00000000..a9930925--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.moody/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.moody"+name = "Moody"+kind = "filter"+category = "Cinematic"+order = 20+intensity = "depth"+description = "Crushed shadows, bronze midtones, colour pulled back, the corners closing in."++[[param]]+key = "depth"+label = "Depth"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "warmth"+label = "Warmth"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "eq=contrast={fixed(1 + depth / 100 * 0.35, 3)}:saturation={fixed(1 - depth / 100 * 0.4, 3)}:brightness={fixed(0 - depth / 100 * 0.06, 3)},colorbalance=rm={fixed(warmth / 100 * 0.1, 3)}:gm={fixed(warmth / 100 * 0.03, 3)}:bm={fixed(0 - warmth / 100 * 0.08, 3)},vignette=a={fixed(depth / 100 * 0.9, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.moody/effect.wgsl b/engine/crates/concat-effects/packages/concat.moody/effect.wgslnew file mode 100644index 00000000..9619aeb9--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.moody/effect.wgsl@@ -0,0 +1,13 @@+struct Params { depth: f32, warmth: f32 }++// Darker, harder, drained, and bronze through the middle.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let depth = params.depth / 100.0;+ var out = c.rgb - vec3<f32>(depth * 0.06);+ out = contrast(out, 1.0 + depth * 0.35);+ out = saturation(out, 1.0 - depth * 0.4);+ out = tint_midtones(out, vec3<f32>(0.1, 0.03, -0.08), params.warmth / 100.0);+ out = vignette(out, uv, depth * 0.7);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.moody/fixtures.toml b/engine/crates/concat-effects/packages/concat.moody/fixtures.tomlnew file mode 100644index 00000000..50b41f6d--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.moody/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "eq=contrast=1.210:saturation=0.760:brightness=-0.036,colorbalance=rm=0.050:gm=0.015:bm=-0.040,vignette=a=0.540"++[[case]]+name = "minimum"+at = "min"+chain = "eq=contrast=1.000:saturation=1.000:brightness=0.000,colorbalance=rm=0.000:gm=0.000:bm=0.000,vignette=a=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "eq=contrast=1.350:saturation=0.600:brightness=-0.060,colorbalance=rm=0.100:gm=0.030:bm=-0.080,vignette=a=0.900"diff --git a/engine/crates/concat-effects/packages/concat.neon/effect.toml b/engine/crates/concat-effects/packages/concat.neon/effect.tomlnew file mode 100644index 00000000..bb2d2370--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.neon/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.neon"+name = "Neon"+kind = "filter"+category = "Stylised"+order = 40+intensity = "glow"+description = "Magenta in the shadows, cyan in the highlights, hard contrast and colour turned up. Night streets and signage."++[[param]]+key = "glow"+label = "Glow"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "punch"+label = "Punch"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "colorbalance=rs={fixed(glow / 100 * 0.18, 3)}:gs={fixed(0 - glow / 100 * 0.1, 3)}:bs={fixed(glow / 100 * 0.18, 3)}:rh={fixed(0 - glow / 100 * 0.1, 3)}:gh={fixed(glow / 100 * 0.1, 3)}:bh={fixed(glow / 100 * 0.15, 3)},eq=contrast={fixed(1 + punch / 100 * 0.5, 3)}:saturation={fixed(1 + punch / 100 * 0.6, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.neon/effect.wgsl b/engine/crates/concat-effects/packages/concat.neon/effect.wgslnew file mode 100644index 00000000..2f0dffbb--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.neon/effect.wgsl@@ -0,0 +1,11 @@+struct Params { glow: f32, punch: f32 }++// The same split tone as a film grade, with the two ends swapped for signage.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let punch = params.punch / 100.0;+ var out = split_tone(c.rgb, vec3<f32>(0.18, -0.1, 0.18), vec3<f32>(-0.1, 0.1, 0.15), params.glow / 100.0);+ out = contrast(out, 1.0 + punch * 0.5);+ out = saturation(out, 1.0 + punch * 0.6);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.neon/fixtures.toml b/engine/crates/concat-effects/packages/concat.neon/fixtures.tomlnew file mode 100644index 00000000..90c77c5a--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.neon/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "colorbalance=rs=0.108:gs=-0.060:bs=0.108:rh=-0.060:gh=0.060:bh=0.090,eq=contrast=1.250:saturation=1.300"++[[case]]+name = "minimum"+at = "min"+chain = "colorbalance=rs=0.000:gs=0.000:bs=0.000:rh=0.000:gh=0.000:bh=0.000,eq=contrast=1.000:saturation=1.000"++[[case]]+name = "maximum"+at = "max"+chain = "colorbalance=rs=0.180:gs=-0.100:bs=0.180:rh=-0.100:gh=0.100:bh=0.150,eq=contrast=1.500:saturation=1.600"diff --git a/engine/crates/concat-effects/packages/concat.soft-light/effect.toml b/engine/crates/concat-effects/packages/concat.soft-light/effect.tomlnew file mode 100644index 00000000..0d647b53--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.soft-light/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.soft-light"+name = "Soft Light"+kind = "filter"+category = "Everyday"+order = 13+intensity = "lift"+description = "Lifted blacks, low contrast, cream in the highlights: airy and flattering."++[[param]]+key = "lift"+label = "Lift"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[[param]]+key = "warmth"+label = "Warmth"+min = 0+max = 100+default = 40+step = 1+unit = "%"++[ffmpeg]+chain = "curves=all='0/{fixed(lift / 100 * 0.12, 3)} 1/1',eq=contrast={fixed(1 - lift / 100 * 0.2, 3)}:saturation={fixed(1 - lift / 100 * 0.15, 3)},colorbalance=rh={fixed(warmth / 100 * 0.08, 3)}:bh={fixed(0 - warmth / 100 * 0.06, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.soft-light/effect.wgsl b/engine/crates/concat-effects/packages/concat.soft-light/effect.wgslnew file mode 100644index 00000000..a02947b9--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.soft-light/effect.wgsl@@ -0,0 +1,12 @@+struct Params { lift: f32, warmth: f32 }++// A fade, less contrast, less colour, and cream in the brights.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let lift = params.lift / 100.0;+ var out = fade(c.rgb, lift * 0.12);+ out = contrast(out, 1.0 - lift * 0.2);+ out = saturation(out, 1.0 - lift * 0.15);+ out = split_tone(out, vec3<f32>(0.0), vec3<f32>(0.08, 0.02, -0.06), params.warmth / 100.0);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.soft-light/fixtures.toml b/engine/crates/concat-effects/packages/concat.soft-light/fixtures.tomlnew file mode 100644index 00000000..170929a8--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.soft-light/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "curves=all='0/0.060 1/1',eq=contrast=0.900:saturation=0.925,colorbalance=rh=0.032:bh=-0.024"++[[case]]+name = "minimum"+at = "min"+chain = "curves=all='0/0.000 1/1',eq=contrast=1.000:saturation=1.000,colorbalance=rh=0.000:bh=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "curves=all='0/0.120 1/1',eq=contrast=0.800:saturation=0.850,colorbalance=rh=0.080:bh=-0.060"diff --git a/engine/crates/concat-effects/packages/concat.spooky/effect.toml b/engine/crates/concat-effects/packages/concat.spooky/effect.tomlnew file mode 100644index 00000000..8dd591b0--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.spooky/effect.toml@@ -0,0 +1,23 @@+[effect]+id = "concat.spooky"+name = "Spooky"+kind = "filter"+category = "Stylised"+order = 41+intensity = "dread"+description = "Drained colour, a green-cyan cast, crushed blacks and a heavy vignette. For the season."++[[param]]+key = "dread"+label = "Dread"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[ffmpeg]+chain = "eq=saturation={fixed(1 - dread / 100 * 0.6, 3)}:contrast={fixed(1 + dread / 100 * 0.4, 3)}:brightness={fixed(0 - dread / 100 * 0.08, 3)},colorbalance=rm={fixed(0 - dread / 100 * 0.08, 3)}:gm={fixed(dread / 100 * 0.1, 3)}:bm={fixed(dread / 100 * 0.06, 3)},vignette=a={fixed(dread / 100 * 1.1, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.spooky/effect.wgsl b/engine/crates/concat-effects/packages/concat.spooky/effect.wgslnew file mode 100644index 00000000..c7dafbb3--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.spooky/effect.wgsl@@ -0,0 +1,13 @@+struct Params { dread: f32 }++// Less colour, more contrast, darker, sickly green, and the walls close in.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let dread = params.dread / 100.0;+ var out = c.rgb - vec3<f32>(dread * 0.08);+ out = saturation(out, 1.0 - dread * 0.6);+ out = contrast(out, 1.0 + dread * 0.4);+ out = tint_midtones(out, vec3<f32>(-0.08, 0.1, 0.06), dread);+ out = vignette(out, uv, dread * 0.85);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.spooky/fixtures.toml b/engine/crates/concat-effects/packages/concat.spooky/fixtures.tomlnew file mode 100644index 00000000..fe417c69--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.spooky/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "eq=saturation=0.640:contrast=1.240:brightness=-0.048,colorbalance=rm=-0.048:gm=0.060:bm=0.036,vignette=a=0.660"++[[case]]+name = "minimum"+at = "min"+chain = "eq=saturation=1.000:contrast=1.000:brightness=0.000,colorbalance=rm=0.000:gm=0.000:bm=0.000,vignette=a=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "eq=saturation=0.400:contrast=1.400:brightness=-0.080,colorbalance=rm=-0.080:gm=0.100:bm=0.060,vignette=a=1.100"diff --git a/engine/crates/concat-effects/packages/concat.vintage/effect.toml b/engine/crates/concat-effects/packages/concat.vintage/effect.tomlnew file mode 100644index 00000000..af03c583--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vintage/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.vintage"+name = "Vintage"+kind = "filter"+category = "Retro"+order = 30+intensity = "age"+description = "Faded blacks, muted colour, a drift toward yellow-green, a soft vignette: a seventies print."++[[param]]+key = "age"+label = "Age"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "tint"+label = "Tint"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "curves=all='0/{fixed(age / 100 * 0.12, 3)} 1/{fixed(1 - age / 100 * 0.06, 3)}',eq=saturation={fixed(1 - age / 100 * 0.35, 3)}:contrast={fixed(1 - age / 100 * 0.12, 3)},colorbalance=rm={fixed(tint / 100 * 0.06, 3)}:gm={fixed(tint / 100 * 0.06, 3)}:bm={fixed(0 - tint / 100 * 0.1, 3)},vignette=a={fixed(age / 100 * 0.5, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.vintage/effect.wgsl b/engine/crates/concat-effects/packages/concat.vintage/effect.wgslnew file mode 100644index 00000000..5deeefc7--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vintage/effect.wgsl@@ -0,0 +1,13 @@+struct Params { age: f32, tint: f32 }++// A fade at both ends, less colour, the print's yellow-green, the corners.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let age = params.age / 100.0;+ var out = fade(c.rgb, age * 0.12) * (1.0 - age * 0.06);+ out = saturation(out, 1.0 - age * 0.35);+ out = contrast(out, 1.0 - age * 0.12);+ out = tint_midtones(out, vec3<f32>(0.06, 0.06, -0.1), params.tint / 100.0);+ out = vignette(out, uv, age * 0.4);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.vintage/fixtures.toml b/engine/crates/concat-effects/packages/concat.vintage/fixtures.tomlnew file mode 100644index 00000000..0e0403bd--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vintage/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "curves=all='0/0.072 1/0.964',eq=saturation=0.790:contrast=0.928,colorbalance=rm=0.030:gm=0.030:bm=-0.050,vignette=a=0.300"++[[case]]+name = "minimum"+at = "min"+chain = "curves=all='0/0.000 1/1.000',eq=saturation=1.000:contrast=1.000,colorbalance=rm=0.000:gm=0.000:bm=0.000,vignette=a=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "curves=all='0/0.120 1/0.940',eq=saturation=0.650:contrast=0.880,colorbalance=rm=0.060:gm=0.060:bm=-0.100,vignette=a=0.500"diff --git a/engine/crates/concat-effects/packages/concat.vivid/effect.toml b/engine/crates/concat-effects/packages/concat.vivid/effect.tomlnew file mode 100644index 00000000..9b68cc6c--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vivid/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.vivid"+name = "Vivid"+kind = "filter"+category = "Everyday"+order = 11+intensity = "colour"+description = "Contrast that bites and colour that sings, sharpened a touch: the look that reads as a better camera."++[[param]]+key = "colour"+label = "Colour"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "punch"+label = "Punch"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "eq=contrast={fixed(1 + punch / 100 * 0.5, 3)},vibrance=intensity={fixed(colour / 100 * 1.5, 3)},unsharp=5:5:{fixed(punch / 100 * 0.6, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.vivid/effect.wgsl b/engine/crates/concat-effects/packages/concat.vivid/effect.wgslnew file mode 100644index 00000000..ee781510--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vivid/effect.wgsl@@ -0,0 +1,15 @@+struct Params { colour: f32, punch: f32 }++// An S-curve, vibrance that spares skin, and a little edge.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let punch = params.punch / 100.0;+ var out = s_curve(c.rgb, punch * 0.8);+ out = vibrance(out, params.colour / 100.0 * 1.5);+ // Unsharp: the picture minus its blur, added back.+ let t = texel();+ let blur = (sample(uv + vec2<f32>(t.x, 0.0)).rgb + sample(uv - vec2<f32>(t.x, 0.0)).rgb+ + sample(uv + vec2<f32>(0.0, t.y)).rgb + sample(uv - vec2<f32>(0.0, t.y)).rgb) * 0.25;+ out = out + (c.rgb - blur) * punch * 0.6;+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.vivid/fixtures.toml b/engine/crates/concat-effects/packages/concat.vivid/fixtures.tomlnew file mode 100644index 00000000..0897d60e--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vivid/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "eq=contrast=1.250,vibrance=intensity=0.900,unsharp=5:5:0.300"++[[case]]+name = "minimum"+at = "min"+chain = "eq=contrast=1.000,vibrance=intensity=0.000,unsharp=5:5:0.000"++[[case]]+name = "maximum"+at = "max"+chain = "eq=contrast=1.500,vibrance=intensity=1.500,unsharp=5:5:0.600"diff --git a/engine/crates/concat-effects/packages/concat.warm/effect.wgsl b/engine/crates/concat-effects/packages/concat.warm/effect.wgslindex b0834a89..5b9577d6 100644--- a/engine/crates/concat-effects/packages/concat.warm/effect.wgsl+++ b/engine/crates/concat-effects/packages/concat.warm/effect.wgsl@@ -2,29 +2,8 @@ struct Params { temperature: f32 }// Colour temperature as a white balance shift: the picture as if it were// lit at `temperature` kelvin while the camera was set for daylight.-fn kelvin(k: f32) -> vec3<f32> {- let t = clamp(k, 1000.0, 40000.0) / 100.0;- var r: f32;- var g: f32;- var b: f32;- if (t <= 66.0) {- r = 1.0;- g = clamp((99.4708 * log(t) - 161.1196) / 255.0, 0.0, 1.0);- if (t <= 19.0) {- b = 0.0;- } else {- b = clamp((138.5177 * log(t - 10.0) - 305.0448) / 255.0, 0.0, 1.0);- }- } else {- r = clamp(329.6987 * pow(t - 60.0, -0.1332) / 255.0, 0.0, 1.0);- g = clamp(288.1222 * pow(t - 60.0, -0.0755) / 255.0, 0.0, 1.0);- b = 1.0;- }- return vec3<f32>(r, g, b);-}fn effect(uv: vec2<f32>) -> vec4<f32> {let c = sample(uv);- let tint = kelvin(params.temperature) / kelvin(6500.0);- return vec4<f32>(clamp(c.rgb * tint, vec3<f32>(0.0), vec3<f32>(1.0)), c.a);+ return vec4<f32>(clamp01(white_balance(c.rgb, params.temperature)), c.a);}diff --git a/engine/crates/concat-effects/src/shader.rs b/engine/crates/concat-effects/src/shader.rsindex 89529265..8ebbe453 100644--- a/engine/crates/concat-effects/src/shader.rs+++ b/engine/crates/concat-effects/src/shader.rs@@ -62,6 +62,124 @@ fn hash(p: vec2<f32>, seed: f32) -> f32 {let q = vec3<f32>(p, seed);return fract(sin(dot(q, vec3<f32>(12.9898, 78.233, 37.719))) * 43758.5453);}++// ── the grading library ──+//+// Every look is a few of these in different amounts, so they live here,+// once, rather than in each package. Each has an FFmpeg twin a manifest's+// chain can reach for: `saturation` is eq=saturation, `contrast` is+// eq=contrast, `fade` and `s_curve` are curves, `split_tone` and+// `tint_midtones` are colorbalance, `white_balance` is colortemperature,+// `vignette` is vignette, `mono` is colorchannelmixer.++/// Everything held to the displayable range.+fn clamp01(rgb: vec3<f32>) -> vec3<f32> {+ return clamp(rgb, vec3<f32>(0.0), vec3<f32>(1.0));+}++/// Saturation about luminance: 1 as shot, 0 grey, above 1 richer.+fn saturation(rgb: vec3<f32>, amount: f32) -> vec3<f32> {+ return mix(vec3<f32>(luma(rgb)), rgb, amount);+}++/// Vibrance: the muted colours saturated more than the vivid ones, so a+/// face does not go orange before a sky goes blue. 0 as shot.+fn vibrance(rgb: vec3<f32>, amount: f32) -> vec3<f32> {+ let mx = max(max(rgb.r, rgb.g), rgb.b);+ let mn = min(min(rgb.r, rgb.g), rgb.b);+ return saturation(rgb, 1.0 + amount * (1.0 - (mx - mn)));+}++/// Contrast about middle grey: 1 as shot.+fn contrast(rgb: vec3<f32>, amount: f32) -> vec3<f32> {+ return (rgb - vec3<f32>(0.5)) * amount + vec3<f32>(0.5);+}++/// An S-curve: shadows down, highlights up, the midtones held. 0 as shot,+/// 1 the whole curve.+fn s_curve(rgb: vec3<f32>, amount: f32) -> vec3<f32> {+ let c = clamp01(rgb);+ return mix(c, c * c * (vec3<f32>(3.0) - 2.0 * c), amount);+}++/// A fade: the blacks lifted to `lift` and the rest compressed to fit,+/// which is what an old print and every faded look does.+fn fade(rgb: vec3<f32>, lift: f32) -> vec3<f32> {+ return rgb * (1.0 - lift) + vec3<f32>(lift);+}++/// Lift, gamma, gain: the three-way grade. Lift moves the shadows, gain+/// scales the highlights, gamma bends the midtones; (0, 1, 1) in every+/// channel is as shot.+fn lift_gamma_gain(rgb: vec3<f32>, lift: vec3<f32>, gamma: vec3<f32>, gain: vec3<f32>) -> vec3<f32> {+ let lifted = rgb * (vec3<f32>(1.0) - lift) + lift;+ let gained = clamp01(lifted * gain);+ return pow(gained, vec3<f32>(1.0) / max(gamma, vec3<f32>(0.01)));+}++/// How much of a pixel is shadow, highlight or midtone, by luminance:+/// the weights a tint on one end of the picture and not the other needs.+fn shadows(rgb: vec3<f32>) -> f32 {+ return 1.0 - smoothstep(0.0, 0.6, luma(rgb));+}+fn highlights(rgb: vec3<f32>) -> f32 {+ return smoothstep(0.4, 1.0, luma(rgb));+}+fn midtones(rgb: vec3<f32>) -> f32 {+ return 1.0 - min(abs(luma(rgb) - 0.5) * 2.0, 1.0);+}++/// A split tone: one tint into the shadows and another into the+/// highlights, each a signed offset per channel, so zero is as shot.+fn split_tone(rgb: vec3<f32>, shadow: vec3<f32>, highlight: vec3<f32>, amount: f32) -> vec3<f32> {+ return rgb + (shadow * shadows(rgb) + highlight * highlights(rgb)) * amount;+}++/// A tint over the midtones alone, the same signed offset.+fn tint_midtones(rgb: vec3<f32>, tint: vec3<f32>, amount: f32) -> vec3<f32> {+ return rgb + tint * midtones(rgb) * amount;+}++/// The colour of black-body light at `k` kelvin.+fn kelvin(k: f32) -> vec3<f32> {+ let t = clamp(k, 1000.0, 40000.0) / 100.0;+ var r: f32;+ var g: f32;+ var b: f32;+ if (t <= 66.0) {+ r = 1.0;+ g = clamp((99.4708 * log(t) - 161.1196) / 255.0, 0.0, 1.0);+ if (t <= 19.0) {+ b = 0.0;+ } else {+ b = clamp((138.5177 * log(t - 10.0) - 305.0448) / 255.0, 0.0, 1.0);+ }+ } else {+ r = clamp(329.6987 * pow(t - 60.0, -0.1332) / 255.0, 0.0, 1.0);+ g = clamp(288.1222 * pow(t - 60.0, -0.0755) / 255.0, 0.0, 1.0);+ b = 1.0;+ }+ return vec3<f32>(r, g, b);+}++/// White balance: the picture as if lit at `k` kelvin while the camera+/// was set for daylight. 6500 is as shot.+fn white_balance(rgb: vec3<f32>, k: f32) -> vec3<f32> {+ return rgb * (kelvin(k) / kelvin(6500.0));+}++/// A vignette: the corners darkened by `amount` from a clear middle.+fn vignette(rgb: vec3<f32>, uv: vec2<f32>, amount: f32) -> vec3<f32> {+ let d = distance(uv, vec2<f32>(0.5)) * 1.4142;+ return rgb * (1.0 - smoothstep(0.35, 1.1, d) * amount);+}++/// Black and white through a coloured filter: the channel weights, made+/// to sum to one. A red filter darkens skies and lightens skin.+fn mono(rgb: vec3<f32>, weights: vec3<f32>) -> vec3<f32> {+ let w = weights / max(weights.r + weights.g + weights.b, 0.001);+ return vec3<f32>(dot(rgb, w));+}"#;/// The stages the host draws with: a full-screen triangle, and a fragmentdiff --git a/engine/crates/concat/locales/en.json b/engine/crates/concat/locales/en.jsonindex fa0c1fd1..eeb803ca 100644--- a/engine/crates/concat/locales/en.json+++ b/engine/crates/concat/locales/en.json@@ -25,6 +25,7 @@"Add track": "Add track","Added {0} captions": "Added {0} captions","Adjust": "Adjust",+ "Age": "Age","Air and presence: a lift above six kilohertz.": "Air and presence: a lift above six kilohertz.","All media": "All media","almost done": "almost done",@@ -46,14 +47,17 @@"Auto removal": "Auto removal","Auto removal keeps what the model finds and drops the rest: a person, or the one thing the picture is of. Custom removal starts from the same mask and takes corrections painted on the monitor: the smart brush keeps the whole thing it touches and the smart eraser removes it, the plain ones do exactly what you paint; Apply ends the painting. Chroma key drops one colour instead; similarity is how far from the colour still counts, softness feathers the edge.": "Auto removal keeps what the model finds and drops the rest: a person, or the one thing the picture is of. Custom removal starts from the same mask and takes corrections painted on the monitor: the smart brush keeps the whole thing it touches and the smart eraser removes it, the plain ones do exactly what you paint; Apply ends the painting. Chroma key drops one colour instead; similarity is how far from the colour still counts, softness feathers the edge.","Balanced": "Balanced",+ "Barely there: neutral balance, a little contrast, colour left honest. What a talking head wants.": "Barely there: neutral balance, a little contrast, colour left honest. What a talking head wants.","Basic": "Basic","Bass": "Bass","Big square pixels.": "Big square pixels.","Bits": "Bits","Black & White": "Black & White",+ "Black and white through a coloured filter: red darkens skies and lightens skin, green does the reverse.": "Black and white through a coloured filter: red darkens skies and lightens skin, green does the reverse.","Blacks": "Blacks","Blend": "Blend","Blue": "Blue",+ "Blue in the shadows and midtones, the highlights left neutral, contrast up. Cities at dusk.": "Blue in the shadows and midtones, the highlights left neutral, contrast up. Cities at dusk.","Blue Screen": "Blue Screen","Blur": "Blur","Body": "Body",@@ -62,10 +66,12 @@"Bounce": "Bounce","Box Blur": "Box Blur","Bright": "Bright",+ "Brighter and richer, with a breath of mint in the highlights: daylight footage made to pop.": "Brighter and richer, with a breath of mint in the highlights: daylight footage made to pop.","Brightness": "Brightness","Brings the clip to a broadcast level without riding the fader.": "Brings the clip to a broadcast level without riding the fader.","Brings the whole clip to one loudness, the way broadcast and the platforms expect.": "Brings the whole clip to one loudness, the way broadcast and the platforms expect.","British": "British",+ "Bronze": "Bronze","Browse": "Browse","Brush": "Brush","Build": "Build",@@ -83,12 +89,14 @@"centred": "centred","Change pitch with speed": "Change pitch with speed","Change what this panel shows, or drag it onto another": "Change what this panel shows, or drag it onto another",+ "Chill": "Chill","Chinese": "Chinese","Chipmunk": "Chipmunk","Choose a folder": "Choose a folder","Choose where the project folder should go": "Choose where the project folder should go","Choose…": "Choose…","Chroma key": "Chroma key",+ "Cinematic": "Cinematic","Clean": "Clean","Clears the room out of a recording: rumble, hiss, sibilance and uneven level.": "Clears the room out of a recording: rumble, hiss, sibilance and uneven level.","Clips": "Clips",@@ -96,6 +104,7 @@"Close window": "Close window","Color": "Color","Colour": "Colour",+ "Colour filter": "Colour filter","Combo": "Combo","Concat {0}": "Concat {0}","Content": "Content",@@ -103,7 +112,9 @@"Contents": "Contents","Contrast": "Contrast","Contrast Pop": "Contrast Pop",+ "Contrast that bites and colour that sings, sharpened a touch: the look that reads as a better camera.": "Contrast that bites and colour that sings, sharpened a touch: the look that reads as a better camera.","Cool": "Cool",+ "Cool Blue": "Cool Blue","Copied": "Copied","Copy": "Copy","Copy system information": "Copy system information",@@ -113,6 +124,7 @@"Creating…": "Creating…","Crisper edges.": "Crisper edges.","Crop": "Crop",+ "Crushed shadows, bronze midtones, colour pulled back, the corners closing in.": "Crushed shadows, bronze midtones, colour pulled back, the corners closing in.","Curve": "Curve","Custom": "Custom","Custom removal": "Custom removal",@@ -141,6 +153,8 @@"Download a transcriber model in Settings › Transcriber first.": "Download a transcriber model in Settings › Transcriber first.","Download a voice model in Settings › Speech first": "Download a voice model in Settings › Speech first","Download a voice model in Settings › Speech first.": "Download a voice model in Settings › Speech first.",+ "Drained colour, a green-cyan cast, crushed blacks and a heavy vignette. For the season.": "Drained colour, a green-cyan cast, crushed blacks and a heavy vignette. For the season.",+ "Dread": "Dread","Drift": "Drift","Drive": "Drive","Driven hard and clipped.": "Driven hard and clipped.",@@ -161,6 +175,7 @@"Enhance voice": "Enhance voice","Eraser": "Eraser","Every colour becomes its opposite.": "Every colour becomes its opposite.",+ "Everyday": "Everyday","Everything on this machine. Transcription and speech run against models you download here, and nothing about a project leaves the device.": "Everything on this machine. Transcription and speech run against models you download here, and nothing about a project leaves the device.","Export": "Export","Export again": "Export again",@@ -175,6 +190,7 @@"Fade": "Fade","Fade in": "Fade in","Fade out": "Fade out",+ "Faded blacks, muted colour, a drift toward yellow-green, a soft vignette: a seventies print.": "Faded blacks, muted colour, a drift toward yellow-green, a soft vignette: a seventies print.","Fades": "Fades","Faster": "Faster","Favourites": "Favourites",@@ -201,6 +217,7 @@"Frame": "Frame","Frame rate": "Frame rate","French": "French",+ "Fresh": "Fresh","Full": "Full","Gain": "Gain","Gaussian Blur": "Gaussian Blur",@@ -211,6 +228,7 @@"Glow": "Glow","Go to end": "Go to end","Go to start": "Go to start",+ "Golden Hour": "Golden Hour","Green": "Green","Green Screen": "Green Screen","Half": "Half",@@ -248,6 +266,7 @@"Keys the green out, leaving the picture over whatever is beneath.": "Keys the green out, leaving the picture over whatever is beneath.","Language": "Language","Large": "Large",+ "Late-afternoon light: warm balance, orange in the highlights, a whisper of magenta in the shadows, blacks lifted.": "Late-afternoon light: warm balance, orange in the highlights, a whisper of magenta in the shadows, blacks lifted.","Layer": "Layer","Layout": "Layout","Left": "Left",@@ -255,6 +274,8 @@"Level": "Level","Levels": "Levels","Library": "Library",+ "Lift": "Lift",+ "Lifted blacks, low contrast, cream in the highlights: airy and flattering.": "Lifted blacks, low contrast, cream in the highlights: airy and flattering.","Lifts speech out of the mix: a little presence, a little control.": "Lifts speech out of the mix: a little presence, a little control.","Light": "Light","Lighten": "Lighten",@@ -267,6 +288,7 @@"Lock {0}": "Lock {0}","Lower and fuller.": "Lower and fuller.","Lower third": "Lower third",+ "Magenta in the shadows, cyan in the highlights, hard contrast and colour turned up. Night streets and signage.": "Magenta in the shadows, cyan in the highlights, hard contrast and colour turned up. Night streets and signage.","male": "male","Mask": "Mask","Mask: Circle": "Mask: Circle",@@ -283,7 +305,9 @@"Model ready": "Model ready","Models": "Models","Modify": "Modify",+ "Mono": "Mono","Montage": "Montage",+ "Moody": "Moody","More low end.": "More low end.","More sparkle.": "More sparkle.","Motion": "Motion",@@ -342,6 +366,7 @@"Plate": "Plate","Plate colour": "Plate colour","Play": "Play",+ "Pop": "Pop","Portuguese": "Portuguese","Position": "Position","Position X": "Position X",@@ -356,6 +381,7 @@"Project": "Project","Project saved": "Project saved","Pulse": "Pulse",+ "Punch": "Punch","Put the detached sound back on its picture": "Put the detached sound back on its picture","Put this clip's sound on its own lane": "Put this clip's sound on its own lane","Quality": "Quality",@@ -383,6 +409,7 @@"Renderer": "Renderer","Rendering video": "Rendering video","Resolution": "Resolution",+ "Retro": "Retro","Reverse": "Reverse","Richer colour where it is muted, without blowing out what is already strong.": "Richer colour where it is muted, without blowing out what is already strong.","Right": "Right",@@ -413,6 +440,7 @@"SemiBold": "SemiBold","Semitones": "Semitones","Sepia": "Sepia",+ "Sepia that keeps its contrast, so it reads as old film rather than a brown wash.": "Sepia that keeps its contrast, so it reads as old film rather than a brown wash.","Settings": "Settings","Settings…": "Settings…","Shadows": "Shadows",@@ -438,6 +466,7 @@"Smart brush: {0}": "Smart brush: {0}","Smart eraser": "Smart eraser","Snap to edges": "Snap to edges",+ "Soft Light": "Soft Light","Softness": "Softness","Soon": "Soon","Sound": "Sound",@@ -449,8 +478,10 @@"Spin": "Spin","Split at playhead": "Split at playhead","Split at playhead (S, or ⌘B for every clip)": "Split at playhead (S, or ⌘B for every clip)",+ "Spooky": "Spooky","Stone and height: reflections that take a while to arrive.": "Stone and height: reflections that take a while to arrive.","Strength": "Strength",+ "Stylised": "Stylised","Stylize": "Stylize","Subject": "Subject","Subtitle": "Subtitle",@@ -510,11 +541,14 @@"Video Effects": "Video Effects","View": "View","Vignette": "Vignette",+ "Vintage": "Vintage",+ "Vivid": "Vivid","Voice": "Voice","Voice added to the timeline": "Voice added to the timeline","Voices": "Voices","Volume": "Volume","Warm": "Warm",+ "Warmth": "Warmth","Where should the project folder go?": "Where should the project folder go?","Whites": "Whites","Width": "Width",diff --git a/engine/crates/concat/ui/assets/effect-previews/bronze.jpg b/engine/crates/concat/ui/assets/effect-previews/bronze.jpgnew file mode 100644index 00000000..b562cb41Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/bronze.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/clean.jpg b/engine/crates/concat/ui/assets/effect-previews/clean.jpgnew file mode 100644index 00000000..9f8c95aeBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/clean.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/cool-blue.jpg b/engine/crates/concat/ui/assets/effect-previews/cool-blue.jpgnew file mode 100644index 00000000..4fbe8591Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/cool-blue.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/fresh.jpg b/engine/crates/concat/ui/assets/effect-previews/fresh.jpgnew file mode 100644index 00000000..72562de6Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/fresh.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/golden-hour.jpg b/engine/crates/concat/ui/assets/effect-previews/golden-hour.jpgnew file mode 100644index 00000000..2c632d6eBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/golden-hour.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/mono.jpg b/engine/crates/concat/ui/assets/effect-previews/mono.jpgnew file mode 100644index 00000000..df8d95b3Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/mono.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/moody.jpg b/engine/crates/concat/ui/assets/effect-previews/moody.jpgnew file mode 100644index 00000000..2f26a5acBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/moody.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/neon.jpg b/engine/crates/concat/ui/assets/effect-previews/neon.jpgnew file mode 100644index 00000000..fd784332Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/neon.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/soft-light.jpg b/engine/crates/concat/ui/assets/effect-previews/soft-light.jpgnew file mode 100644index 00000000..736d69a6Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/soft-light.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/spooky.jpg b/engine/crates/concat/ui/assets/effect-previews/spooky.jpgnew file mode 100644index 00000000..fbd09430Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/spooky.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/vintage.jpg b/engine/crates/concat/ui/assets/effect-previews/vintage.jpgnew file mode 100644index 00000000..c27bb292Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/vintage.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/vivid.jpg b/engine/crates/concat/ui/assets/effect-previews/vivid.jpgnew file mode 100644index 00000000..2556708dBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/vivid.jpg differdiff --git a/engine/crates/concat/ui/workspace/media-pane.slint b/engine/crates/concat/ui/workspace/media-pane.slintindex 17cdc11a..cce81865 100644--- a/engine/crates/concat/ui/workspace/media-pane.slint+++ b/engine/crates/concat/ui/workspace/media-pane.slint@@ -1336,6 +1336,19 @@ export component MediaPane inherits Rectangle {if (id == "concat.mirror") { return @image-url("../assets/effect-previews/mirror.jpg"); }if (id == "concat.fisheye") { return @image-url("../assets/effect-previews/fisheye.jpg"); }if (id == "concat.shake") { return @image-url("../assets/effect-previews/shake.jpg"); }+ // The looks, rendered by their own chains; see concat-effects' previews example.+ if (id == "concat.fresh") { return @image-url("../assets/effect-previews/fresh.jpg"); }+ if (id == "concat.vivid") { return @image-url("../assets/effect-previews/vivid.jpg"); }+ if (id == "concat.clean") { return @image-url("../assets/effect-previews/clean.jpg"); }+ if (id == "concat.soft-light") { return @image-url("../assets/effect-previews/soft-light.jpg"); }+ if (id == "concat.golden-hour") { return @image-url("../assets/effect-previews/golden-hour.jpg"); }+ if (id == "concat.moody") { return @image-url("../assets/effect-previews/moody.jpg"); }+ if (id == "concat.cool-blue") { return @image-url("../assets/effect-previews/cool-blue.jpg"); }+ if (id == "concat.vintage") { return @image-url("../assets/effect-previews/vintage.jpg"); }+ if (id == "concat.bronze") { return @image-url("../assets/effect-previews/bronze.jpg"); }+ if (id == "concat.mono") { return @image-url("../assets/effect-previews/mono.jpg"); }+ if (id == "concat.neon") { return @image-url("../assets/effect-previews/neon.jpg"); }+ if (id == "concat.spooky") { return @image-url("../assets/effect-previews/spooky.jpg"); }return root.no-art;}/// The category column. In-out, because it is dragged.