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
The library learns to target and to texture, and seven more looks ship on it
Jareerded308268504
diff --git a/engine/crates/concat-effects/packages/concat.cloudless-sky/effect.toml b/engine/crates/concat-effects/packages/concat.cloudless-sky/effect.tomlnew file mode 100644index 00000000..17ebeafc--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.cloudless-sky/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.cloudless-sky"+name = "Cloudless Sky"+kind = "filter"+category = "Everyday"+order = 15+intensity = "sky"+description = "Blues deeper and richer, greens cooled, everything else left alone. Travel footage."++[[param]]+key = "sky"+label = "Sky"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "greens"+label = "Greens"+min = 0+max = 100+default = 40+step = 1+unit = "%"++[ffmpeg]+chain = "selectivecolor=blues='{fixed(sky / 100 * 0.4, 3)} 0 {fixed(0 - sky / 100 * 0.3, 3)} {fixed(sky / 100 * 0.15, 3)}':greens='{fixed(greens / 100 * 0.2, 3)} 0 {fixed(0 - greens / 100 * 0.2, 3)} 0',eq=saturation={fixed(1 + sky / 100 * 0.1, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.cloudless-sky/effect.wgsl b/engine/crates/concat-effects/packages/concat.cloudless-sky/effect.wgslnew file mode 100644index 00000000..b719a33f--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.cloudless-sky/effect.wgsl@@ -0,0 +1,11 @@+struct Params { sky: f32, greens: f32 }++// Two hue bands, each treated on its own and the rest untouched.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let blue = hue_mask(c.rgb, 215.0, 70.0) * params.sky / 100.0;+ let green = hue_mask(c.rgb, 110.0, 70.0) * params.greens / 100.0;+ var out = mix(c.rgb, saturation(c.rgb, 1.6) * 0.9, blue);+ out = mix(out, saturation(out, 0.85) + vec3<f32>(-0.03, 0.0, 0.05), green);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.cloudless-sky/fixtures.toml b/engine/crates/concat-effects/packages/concat.cloudless-sky/fixtures.tomlnew file mode 100644index 00000000..af3db743--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.cloudless-sky/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "selectivecolor=blues='0.240 0 -0.180 0.090':greens='0.080 0 -0.080 0',eq=saturation=1.060"++[[case]]+name = "minimum"+at = "min"+chain = "selectivecolor=blues='0.000 0 0.000 0.000':greens='0.000 0 0.000 0',eq=saturation=1.000"++[[case]]+name = "maximum"+at = "max"+chain = "selectivecolor=blues='0.400 0 -0.300 0.150':greens='0.200 0 -0.200 0',eq=saturation=1.100"diff --git a/engine/crates/concat-effects/packages/concat.film/effect.toml b/engine/crates/concat-effects/packages/concat.film/effect.tomlnew file mode 100644index 00000000..53c83fc8--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.film/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.film"+name = "Film"+kind = "filter"+category = "Cinematic"+order = 24+intensity = "grain"+description = "A film curve with a soft toe and shoulder, a little warmth, and grain that moves."++[[param]]+key = "grain"+label = "Grain"+min = 0+max = 100+default = 40+step = 1+unit = "%"++[[param]]+key = "warmth"+label = "Warmth"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "curves=all='0/0.03 0.25/0.22 0.75/0.8 1/0.97',colorbalance=rm={fixed(warmth / 100 * 0.06, 3)}:bm={fixed(0 - warmth / 100 * 0.06, 3)},noise=alls={round(grain / 100 * 30)}:allf=t"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.film/effect.wgsl b/engine/crates/concat-effects/packages/concat.film/effect.wgslnew file mode 100644index 00000000..8e469ca8--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.film/effect.wgsl@@ -0,0 +1,10 @@+struct Params { grain: f32, warmth: f32 }++// Toe and shoulder, a warm middle, and the grain on top.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ var out = s_curve(fade(c.rgb, 0.03), 0.35) * 0.985;+ out = tint_midtones(out, vec3<f32>(0.06, 0.0, -0.06), params.warmth / 100.0);+ out = out + grain_at(uv, params.grain / 100.0 * 0.12);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.film/fixtures.toml b/engine/crates/concat-effects/packages/concat.film/fixtures.tomlnew file mode 100644index 00000000..3625729f--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.film/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "curves=all='0/0.03 0.25/0.22 0.75/0.8 1/0.97',colorbalance=rm=0.030:bm=-0.030,noise=alls=12:allf=t"++[[case]]+name = "minimum"+at = "min"+chain = "curves=all='0/0.03 0.25/0.22 0.75/0.8 1/0.97',colorbalance=rm=0.000:bm=0.000,noise=alls=0:allf=t"++[[case]]+name = "maximum"+at = "max"+chain = "curves=all='0/0.03 0.25/0.22 0.75/0.8 1/0.97',colorbalance=rm=0.060:bm=-0.060,noise=alls=30:allf=t"diff --git a/engine/crates/concat-effects/packages/concat.night/effect.toml b/engine/crates/concat-effects/packages/concat.night/effect.tomlnew file mode 100644index 00000000..2f77a7a2--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.night/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.night"+name = "Night"+kind = "filter"+category = "Cinematic"+order = 23+intensity = "lift"+description = "Low light opened up: shadows lifted, the darks softened so the noise does not come up with them, the blue kept."++[[param]]+key = "lift"+label = "Lift"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "clarity"+label = "Clarity"+min = 0+max = 100+default = 40+step = 1+unit = "%"++[ffmpeg]+chain = "curves=all='0/{fixed(lift / 100 * 0.06, 3)} 0.25/{fixed(0.25 + lift / 100 * 0.15, 3)} 0.5/{fixed(0.5 + lift / 100 * 0.1, 3)} 1/1',hqdn3d={fixed(clarity / 100 * 6, 2)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.night/effect.wgsl b/engine/crates/concat-effects/packages/concat.night/effect.wgslnew file mode 100644index 00000000..bd739b9a--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.night/effect.wgsl@@ -0,0 +1,11 @@+struct Params { lift: f32, clarity: f32 }++// The darks are softened before they are lifted, so grain stays down.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let lift = params.lift / 100.0;+ let soft = soften(uv, 3.0);+ let base = mix(c.rgb, soft, shadows(c.rgb) * params.clarity / 100.0);+ let out = lift_gamma_gain(base, vec3<f32>(lift * 0.06), vec3<f32>(1.0 + lift * 0.45), vec3<f32>(1.0));+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.night/fixtures.toml b/engine/crates/concat-effects/packages/concat.night/fixtures.tomlnew file mode 100644index 00000000..1ed1ecc8--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.night/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "curves=all='0/0.036 0.25/0.340 0.5/0.560 1/1',hqdn3d=2.40"++[[case]]+name = "minimum"+at = "min"+chain = "curves=all='0/0.000 0.25/0.250 0.5/0.500 1/1',hqdn3d=0.00"++[[case]]+name = "maximum"+at = "max"+chain = "curves=all='0/0.060 0.25/0.400 0.5/0.600 1/1',hqdn3d=6.00"diff --git a/engine/crates/concat-effects/packages/concat.pink-fuzz/effect.toml b/engine/crates/concat-effects/packages/concat.pink-fuzz/effect.tomlnew file mode 100644index 00000000..6c59b959--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.pink-fuzz/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.pink-fuzz"+name = "Pink Fuzz"+kind = "filter"+category = "Stylised"+order = 42+intensity = "haze"+description = "Low contrast, pink and lavender in the light, and a soft bloom over it all. The dreamy one."++[[param]]+key = "haze"+label = "Haze"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "blush"+label = "Blush"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "curves=all='0/{fixed(haze / 100 * 0.1, 3)} 1/1',eq=contrast={fixed(1 - haze / 100 * 0.2, 3)}:saturation={fixed(1 - haze / 100 * 0.15, 3)},colorbalance=rh={fixed(blush / 100 * 0.1, 3)}:gh={fixed(0 - blush / 100 * 0.04, 3)}:bh={fixed(blush / 100 * 0.08, 3)},split[fuzza{index}][fuzzb{index}];[fuzzb{index}]gblur=sigma=12[fuzzg{index}];[fuzza{index}][fuzzg{index}]blend=all_mode=screen:all_opacity={fixed(haze / 100 * 0.35, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.pink-fuzz/effect.wgsl b/engine/crates/concat-effects/packages/concat.pink-fuzz/effect.wgslnew file mode 100644index 00000000..d304a533--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.pink-fuzz/effect.wgsl@@ -0,0 +1,15 @@+struct Params { haze: f32, blush: f32 }++// A fade, less contrast, the blush in the brights, and a bloom screened over.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let haze = params.haze / 100.0;+ var out = fade(c.rgb, haze * 0.1);+ out = contrast(out, 1.0 - haze * 0.2);+ out = saturation(out, 1.0 - haze * 0.15);+ out = split_tone(out, vec3<f32>(0.0), vec3<f32>(0.1, -0.04, 0.08), params.blush / 100.0);+ let bloom = soften(uv, 10.0);+ let screen = vec3<f32>(1.0) - (vec3<f32>(1.0) - out) * (vec3<f32>(1.0) - bloom);+ out = mix(out, screen, haze * 0.35);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.pink-fuzz/fixtures.toml b/engine/crates/concat-effects/packages/concat.pink-fuzz/fixtures.tomlnew file mode 100644index 00000000..ee7a7e88--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.pink-fuzz/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "curves=all='0/0.060 1/1',eq=contrast=0.880:saturation=0.910,colorbalance=rh=0.050:gh=-0.020:bh=0.040,split[fuzza0][fuzzb0];[fuzzb0]gblur=sigma=12[fuzzg0];[fuzza0][fuzzg0]blend=all_mode=screen:all_opacity=0.210"++[[case]]+name = "minimum"+at = "min"+chain = "curves=all='0/0.000 1/1',eq=contrast=1.000:saturation=1.000,colorbalance=rh=0.000:gh=0.000:bh=0.000,split[fuzza0][fuzzb0];[fuzzb0]gblur=sigma=12[fuzzg0];[fuzza0][fuzzg0]blend=all_mode=screen:all_opacity=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "curves=all='0/0.100 1/1',eq=contrast=0.800:saturation=0.850,colorbalance=rh=0.100:gh=-0.040:bh=0.080,split[fuzza0][fuzzb0];[fuzzb0]gblur=sigma=12[fuzzg0];[fuzza0][fuzzg0]blend=all_mode=screen:all_opacity=0.350"diff --git a/engine/crates/concat-effects/packages/concat.retro-cartoon/effect.toml b/engine/crates/concat-effects/packages/concat.retro-cartoon/effect.tomlnew file mode 100644index 00000000..78efe89a--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.retro-cartoon/effect.toml@@ -0,0 +1,34 @@+[effect]+id = "concat.retro-cartoon"+name = "Retro Cartoon"+kind = "filter"+category = "Stylised"+order = 43+intensity = "ink"+description = "Flat bands of colour with inked edges, like a printed comic."++[[param]]+key = "levels"+label = "Levels"+min = 2+max = 8+default = 5+step = 1++[[param]]+key = "ink"+label = "Ink"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[ffmpeg]+let = [+ "size = round(256 / max(round(levels), 2))",+]+chain = "lutrgb=r=trunc(val/{size})*{size}:g=trunc(val/{size})*{size}:b=trunc(val/{size})*{size},split[inka{index}][inkb{index}];[inkb{index}]edgedetect=mode=colormix:low=0.08:high=0.25[inke{index}];[inka{index}][inke{index}]blend=all_mode=normal:all_opacity={fixed(ink / 100, 3)}"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.retro-cartoon/effect.wgsl b/engine/crates/concat-effects/packages/concat.retro-cartoon/effect.wgslnew file mode 100644index 00000000..cd465962--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.retro-cartoon/effect.wgsl@@ -0,0 +1,10 @@+struct Params { levels: f32, ink: f32 }++// Posterized, then darkened where the picture has an edge.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let levels = max(round(params.levels), 2.0);+ let flat = floor(c.rgb * levels) / (levels - 1.0);+ let ink = edge_at(uv) * params.ink / 100.0;+ return vec4<f32>(clamp01(flat * (1.0 - ink)), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.retro-cartoon/fixtures.toml b/engine/crates/concat-effects/packages/concat.retro-cartoon/fixtures.tomlnew file mode 100644index 00000000..3357b440--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.retro-cartoon/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "lutrgb=r=trunc(val/51)*51:g=trunc(val/51)*51:b=trunc(val/51)*51,split[inka0][inkb0];[inkb0]edgedetect=mode=colormix:low=0.08:high=0.25[inke0];[inka0][inke0]blend=all_mode=normal:all_opacity=0.600"++[[case]]+name = "minimum"+at = "min"+chain = "lutrgb=r=trunc(val/128)*128:g=trunc(val/128)*128:b=trunc(val/128)*128,split[inka0][inkb0];[inkb0]edgedetect=mode=colormix:low=0.08:high=0.25[inke0];[inka0][inke0]blend=all_mode=normal:all_opacity=0.000"++[[case]]+name = "maximum"+at = "max"+chain = "lutrgb=r=trunc(val/32)*32:g=trunc(val/32)*32:b=trunc(val/32)*32,split[inka0][inkb0];[inkb0]edgedetect=mode=colormix:low=0.08:high=0.25[inke0];[inka0][inke0]blend=all_mode=normal:all_opacity=1.000"diff --git a/engine/crates/concat-effects/packages/concat.teal-orange/effect.toml b/engine/crates/concat-effects/packages/concat.teal-orange/effect.tomlnew file mode 100644index 00000000..bfa18439--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.teal-orange/effect.toml@@ -0,0 +1,41 @@+[effect]+id = "concat.teal-orange"+name = "Teal & Orange"+kind = "filter"+category = "Cinematic"+order = 22+intensity = "amount"+description = "Teal in the shadows, orange in the highlights, skin left as skin: the blockbuster grade."++[[param]]+key = "amount"+label = "Amount"+min = 0+max = 100+default = 70+step = 1+unit = "%"++[[param]]+key = "contrast"+label = "Contrast"+min = 0+max = 100+default = 25+step = 1+unit = "%"++[[param]]+key = "skin"+label = "Protect skin"+min = 0+max = 100+default = 80+step = 1+unit = "%"++[ffmpeg]+chain = "colorbalance=rs={fixed(0 - amount / 100 * 0.12, 3)}:gs={fixed(amount / 100 * 0.04, 3)}:bs={fixed(amount / 100 * 0.16, 3)}:rh={fixed(amount / 100 * 0.16, 3)}:gh={fixed(amount / 100 * 0.04, 3)}:bh={fixed(0 - amount / 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.teal-orange/effect.wgsl b/engine/crates/concat-effects/packages/concat.teal-orange/effect.wgslnew file mode 100644index 00000000..a700679d--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.teal-orange/effect.wgsl@@ -0,0 +1,10 @@+struct Params { amount: f32, contrast: f32, skin: f32 }++// The split tone, held back where the pixel is skin, then the curve.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let c = sample(uv);+ let keep = 1.0 - skin_mask(c.rgb) * params.skin / 100.0;+ var out = split_tone(c.rgb, vec3<f32>(-0.12, 0.04, 0.16), vec3<f32>(0.16, 0.04, -0.12), params.amount / 100.0 * keep);+ out = s_curve(out, params.contrast / 100.0 * 0.8);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.teal-orange/fixtures.toml b/engine/crates/concat-effects/packages/concat.teal-orange/fixtures.tomlnew file mode 100644index 00000000..7125d0d2--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.teal-orange/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "colorbalance=rs=-0.084:gs=0.028:bs=0.112:rh=0.112:gh=0.028:bh=-0.084,eq=contrast=1.100"++[[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"++[[case]]+name = "maximum"+at = "max"+chain = "colorbalance=rs=-0.120:gs=0.040:bs=0.160:rh=0.160:gh=0.040:bh=-0.120,eq=contrast=1.400"diff --git a/engine/crates/concat-effects/packages/concat.vhs/effect.toml b/engine/crates/concat-effects/packages/concat.vhs/effect.tomlnew file mode 100644index 00000000..6f644750--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vhs/effect.toml@@ -0,0 +1,32 @@+[effect]+id = "concat.vhs"+name = "VHS"+kind = "filter"+category = "Retro"+order = 33+intensity = "bleed"+description = "Colour bleeding sideways, scan lines, softness, tape noise and too much saturation."++[[param]]+key = "bleed"+label = "Bleed"+min = 0+max = 100+default = 60+step = 1+unit = "%"++[[param]]+key = "lines"+label = "Lines"+min = 0+max = 100+default = 50+step = 1+unit = "%"++[ffmpeg]+chain = "chromashift=crh={round(0 - bleed / 100 * 6)}:cbh={round(bleed / 100 * 6)},gblur=sigma={fixed(0.2 + bleed / 100 * 0.8, 2)},eq=saturation=1.3,noise=alls={round(lines / 100 * 20)}:allf=t"++[wgsl]+entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.vhs/effect.wgsl b/engine/crates/concat-effects/packages/concat.vhs/effect.wgslnew file mode 100644index 00000000..c3465b37--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vhs/effect.wgsl@@ -0,0 +1,16 @@+struct Params { bleed: f32, lines: f32 }++// Red and blue sampled off to either side, then the tape's own marks.+fn effect(uv: vec2<f32>) -> vec4<f32> {+ let bleed = params.bleed / 100.0;+ let lines = params.lines / 100.0;+ let off = vec2<f32>(texel().x * bleed * 3.0, 0.0);+ let c = sample(uv);+ var out = vec3<f32>(sample(uv - off).r, c.g, sample(uv + off).b);+ out = mix(out, soften(uv, 2.0), bleed * 0.4);+ out = saturation(out, 1.3);+ let row = fract(uv.y * frame.size.y / 3.0);+ out = out * (1.0 - lines * 0.25 * step(0.5, row));+ out = out + grain_at(uv, lines * 0.08);+ return vec4<f32>(clamp01(out), c.a);+}diff --git a/engine/crates/concat-effects/packages/concat.vhs/fixtures.toml b/engine/crates/concat-effects/packages/concat.vhs/fixtures.tomlnew file mode 100644index 00000000..376f9f19--- /dev/null+++ b/engine/crates/concat-effects/packages/concat.vhs/fixtures.toml@@ -0,0 +1,13 @@+[[case]]+name = "default"+chain = "chromashift=crh=-4:cbh=4,gblur=sigma=0.68,eq=saturation=1.3,noise=alls=10:allf=t"++[[case]]+name = "minimum"+at = "min"+chain = "chromashift=crh=0:cbh=0,gblur=sigma=0.20,eq=saturation=1.3,noise=alls=0:allf=t"++[[case]]+name = "maximum"+at = "max"+chain = "chromashift=crh=-6:cbh=6,gblur=sigma=1.00,eq=saturation=1.3,noise=alls=20:allf=t"diff --git a/engine/crates/concat-effects/src/shader.rs b/engine/crates/concat-effects/src/shader.rsindex 8ebbe453..4db0ed37 100644--- a/engine/crates/concat-effects/src/shader.rs+++ b/engine/crates/concat-effects/src/shader.rs@@ -180,6 +180,84 @@ 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));}++// ── targeting and texture: the taps a look takes around a pixel, and the+// bands of colour it singles out. FFmpeg twins: `hue_mask` is+// selectivecolor, `soften` is gblur, `grain_at` is noise, `edge_at` is+// edgedetect.++/// Hue in degrees, 0..360; 0 for a grey.+fn hue_of(rgb: vec3<f32>) -> f32 {+ let mx = max(max(rgb.r, rgb.g), rgb.b);+ let mn = min(min(rgb.r, rgb.g), rgb.b);+ let d = mx - mn;+ if (d < 0.0001) {+ return 0.0;+ }+ var h: f32;+ if (mx == rgb.r) {+ h = (rgb.g - rgb.b) / d;+ } else if (mx == rgb.g) {+ h = 2.0 + (rgb.b - rgb.r) / d;+ } else {+ h = 4.0 + (rgb.r - rgb.g) / d;+ }+ return fract(h / 6.0) * 360.0;+}++/// Chroma, 0..1: how far from grey.+fn chroma_of(rgb: vec3<f32>) -> f32 {+ return max(max(rgb.r, rgb.g), rgb.b) - min(min(rgb.r, rgb.g), rgb.b);+}++/// How much a pixel belongs to the hues within `width` degrees of+/// `centre`, weighted by chroma so a grey belongs to no band.+fn hue_mask(rgb: vec3<f32>, centre: f32, width: f32) -> f32 {+ let d = abs(fract((hue_of(rgb) - centre) / 360.0 + 0.5) * 360.0 - 180.0);+ return (1.0 - smoothstep(width * 0.5, width, d)) * smoothstep(0.0, 0.25, chroma_of(rgb));+}++/// The weight of skin: the orange band, a warm tan to a pale cheek.+fn skin_mask(rgb: vec3<f32>) -> f32 {+ return hue_mask(rgb, 25.0, 40.0);+}++/// The layer averaged over a square of taps `radius` pixels across: a+/// bloom, a soft denoise, the blur an unsharp mask subtracts.+fn soften(uv: vec2<f32>, radius: f32) -> vec3<f32> {+ let t = texel() * radius * 0.5;+ var sum = vec3<f32>(0.0);+ for (var y: i32 = -2; y <= 2; y++) {+ for (var x: i32 = -2; x <= 2; x++) {+ sum += sample(uv + vec2<f32>(f32(x), f32(y)) * t).rgb;+ }+ }+ return sum / 25.0;+}++/// Grain: noise that changes every frame, centred on zero, `amount` as a+/// fraction of the range. Seeded by the frame's time so the monitor and+/// the export show the same grain on the same frame.+fn grain_at(uv: vec2<f32>, amount: f32) -> vec3<f32> {+ let n = hash(uv * frame.size, fract(frame.time * 7.31)) - 0.5;+ return vec3<f32>(n * amount);+}++/// The strength of an edge at `uv`: Sobel on luminance, 0..1.+fn edge_at(uv: vec2<f32>) -> f32 {+ let t = texel();+ let tl = luma(sample(uv + vec2<f32>(-t.x, -t.y)).rgb);+ let tc = luma(sample(uv + vec2<f32>(0.0, -t.y)).rgb);+ let tr = luma(sample(uv + vec2<f32>(t.x, -t.y)).rgb);+ let ml = luma(sample(uv + vec2<f32>(-t.x, 0.0)).rgb);+ let mr = luma(sample(uv + vec2<f32>(t.x, 0.0)).rgb);+ let bl = luma(sample(uv + vec2<f32>(-t.x, t.y)).rgb);+ let bc = luma(sample(uv + vec2<f32>(0.0, t.y)).rgb);+ let br = luma(sample(uv + vec2<f32>(t.x, t.y)).rgb);+ let gx = (tr + 2.0 * mr + br) - (tl + 2.0 * ml + bl);+ let gy = (bl + 2.0 * bc + br) - (tl + 2.0 * tc + tr);+ return clamp(sqrt(gx * gx + gy * gy), 0.0, 1.0);+}"#;/// 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 eeb803ca..8c57e052 100644--- a/engine/crates/concat/locales/en.json+++ b/engine/crates/concat/locales/en.json@@ -5,6 +5,7 @@"1 stroke": "1 stroke","A brighter, lighter, closer voice. Pitch at 0 follows the amount.": "A brighter, lighter, closer voice. Pitch at 0 follows the amount.","A concert hall: long, even reflections.": "A concert hall: long, even reflections.",+ "A film curve with a soft toe and shoulder, a little warmth, and grain that moves.": "A film curve with a soft toe and shoulder, a little warmth, and grain that moves.","A flat, boxy blur.": "A flat, boxy blur.","A handheld jitter.": "A handheld jitter.","A horizontal streak, as if the camera panned.": "A horizontal streak, as if the camera panned.",@@ -55,11 +56,14 @@"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",+ "Bleed": "Bleed","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",+ "Blues deeper and richer, greens cooled, everything else left alone. Travel footage.": "Blues deeper and richer, greens cooled, everything else left alone. Travel footage.","Blur": "Blur",+ "Blush": "Blush","Body": "Body","Bold": "Bold","Bottom": "Bottom",@@ -97,13 +101,16 @@"Choose…": "Choose…","Chroma key": "Chroma key","Cinematic": "Cinematic",+ "Clarity": "Clarity","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","Close project": "Close project","Close window": "Close window",+ "Cloudless Sky": "Cloudless Sky","Color": "Color","Colour": "Colour",+ "Colour bleeding sideways, scan lines, softness, tape noise and too much saturation.": "Colour bleeding sideways, scan lines, softness, tape noise and too much saturation.","Colour filter": "Colour filter","Combo": "Combo","Concat {0}": "Concat {0}",@@ -199,6 +206,7 @@"Fetching the model… {0}%": "Fetching the model… {0}%","File": "File","Fill": "Fill",+ "Film": "Film","Film Grain": "Film Grain","Filter": "Filter","filter": "filter",@@ -208,6 +216,7 @@"Fisheye": "Fisheye","Flash In": "Flash In","Flash Out": "Flash Out",+ "Flat bands of colour with inked edges, like a printed comic.": "Flat bands of colour with inked edges, like a printed comic.","Flat bands of colour, like a screen print.": "Flat bands of colour, like a screen print.","Flip horizontal": "Flip horizontal","Flip vertical": "Flip vertical",@@ -229,10 +238,13 @@"Go to end": "Go to end","Go to start": "Go to start","Golden Hour": "Golden Hour",+ "Grain": "Grain","Green": "Green","Green Screen": "Green Screen",+ "Greens": "Greens","Half": "Half","Hall": "Hall",+ "Haze": "Haze","Headline": "Headline","Height": "Height","Hero": "Hero",@@ -251,6 +263,7 @@"In": "In","In and Out play over the clip's first and last seconds; Combo runs its whole length. Each moves the clip from where you placed it, so position it first.": "In and Out play over the clip's first and last seconds; Combo runs its whole length. Each moves the clip from where you placed it, so position it first.","In use": "In use",+ "Ink": "Ink","Inspector": "Inspector","Intensity": "Intensity","Invert": "Invert",@@ -281,11 +294,14 @@"Lighten": "Lighten","Lightness": "Lightness","Line height": "Line height",+ "Lines": "Lines","Lo-fi": "Lo-fi","Loading the model": "Loading the model","Location": "Location","Lock track": "Lock track","Lock {0}": "Lock {0}",+ "Low contrast, pink and lavender in the light, and a soft bloom over it all. The dreamy one.": "Low contrast, pink and lavender in the light, and a soft bloom over it all. The dreamy one.",+ "Low light opened up: shadows lifted, the darks softened so the noise does not come up with them, the blue kept.": "Low light opened up: shadows lifted, the darks softened so the noise does not come up with them, the blue kept.","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.",@@ -323,6 +339,7 @@"Neon": "Neon","New project": "New project","Next frame": "Next frame",+ "Night": "Night","No effect on this clip yet. Pick one from the Library's Effects page.": "No effect on this clip yet. Pick one from the Library's Effects page.","No templates yet. Mark media as slots, then save this project as a template.": "No templates yet. Mark media as slots, then save this project as a template.","No voice to read with": "No voice to read with",@@ -360,6 +377,7 @@"Pause": "Pause","Person": "Person","Pick an effect or filter from the library": "Pick an effect or filter from the library",+ "Pink Fuzz": "Pink Fuzz","Pitch": "Pitch","Pixelate": "Pixelate","Placement": "Placement",@@ -380,6 +398,7 @@"PROJECT": "PROJECT","Project": "Project","Project saved": "Project saved",+ "Protect skin": "Protect skin","Pulse": "Pulse","Punch": "Punch","Put the detached sound back on its picture": "Put the detached sound back on its picture",@@ -410,6 +429,7 @@"Rendering video": "Rendering video","Resolution": "Resolution","Retro": "Retro",+ "Retro Cartoon": "Retro Cartoon","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",@@ -456,6 +476,7 @@"Silent": "Silent","Similarity": "Similarity","Size": "Size",+ "Sky": "Sky","Slide Down": "Slide Down","Slide Left": "Slide Left","Slide Right": "Slide Right",@@ -491,6 +512,8 @@"Takes the hum and hiss out from under the voice.": "Takes the hum and hiss out from under the voice.","Takes the room's hiss and hum out from under the voice.": "Takes the room's hiss and hum out from under the voice.","Target": "Target",+ "Teal & Orange": "Teal & Orange",+ "Teal in the shadows, orange in the highlights, skin left as skin: the blockbuster grade.": "Teal in the shadows, orange in the highlights, skin left as skin: the blockbuster grade.","Telephone": "Telephone","Temperature": "Temperature","Templates": "Templates",@@ -536,6 +559,7 @@"Untitled project": "Untitled project","Up or down by semitones, the length untouched.": "Up or down by semitones, the length untouched.","Vertical": "Vertical",+ "VHS": "VHS","Vibrance": "Vibrance","Video": "Video","Video Effects": "Video Effects",diff --git a/engine/crates/concat/ui/assets/effect-previews/cloudless-sky.jpg b/engine/crates/concat/ui/assets/effect-previews/cloudless-sky.jpgnew file mode 100644index 00000000..bbe61a99Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/cloudless-sky.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/film.jpg b/engine/crates/concat/ui/assets/effect-previews/film.jpgnew file mode 100644index 00000000..df86712eBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/film.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/night.jpg b/engine/crates/concat/ui/assets/effect-previews/night.jpgnew file mode 100644index 00000000..cef197afBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/night.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/pink-fuzz.jpg b/engine/crates/concat/ui/assets/effect-previews/pink-fuzz.jpgnew file mode 100644index 00000000..b1263dceBinary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/pink-fuzz.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/retro-cartoon.jpg b/engine/crates/concat/ui/assets/effect-previews/retro-cartoon.jpgnew file mode 100644index 00000000..121c8041Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/retro-cartoon.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/teal-orange.jpg b/engine/crates/concat/ui/assets/effect-previews/teal-orange.jpgnew file mode 100644index 00000000..5b2dd644Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/teal-orange.jpg differdiff --git a/engine/crates/concat/ui/assets/effect-previews/vhs.jpg b/engine/crates/concat/ui/assets/effect-previews/vhs.jpgnew file mode 100644index 00000000..9b2d2793Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/vhs.jpg differdiff --git a/engine/crates/concat/ui/workspace/media-pane.slint b/engine/crates/concat/ui/workspace/media-pane.slintindex cce81865..95e33a4d 100644--- a/engine/crates/concat/ui/workspace/media-pane.slint+++ b/engine/crates/concat/ui/workspace/media-pane.slint@@ -1349,6 +1349,13 @@ export component MediaPane inherits Rectangle {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"); }+ if (id == "concat.teal-orange") { return @image-url("../assets/effect-previews/teal-orange.jpg"); }+ if (id == "concat.cloudless-sky") { return @image-url("../assets/effect-previews/cloudless-sky.jpg"); }+ if (id == "concat.night") { return @image-url("../assets/effect-previews/night.jpg"); }+ if (id == "concat.film") { return @image-url("../assets/effect-previews/film.jpg"); }+ if (id == "concat.vhs") { return @image-url("../assets/effect-previews/vhs.jpg"); }+ if (id == "concat.pink-fuzz") { return @image-url("../assets/effect-previews/pink-fuzz.jpg"); }+ if (id == "concat.retro-cartoon") { return @image-url("../assets/effect-previews/retro-cartoon.jpg"); }return root.no-art;}/// The category column. In-out, because it is dragged.