Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

Falling Dust, drawn rather than pasted: the twenty looks are all in

Jareer19807ca0a270
diff --git a/engine/crates/concat-effects/packages/concat.falling-dust/effect.toml b/engine/crates/concat-effects/packages/concat.falling-dust/effect.toml
new file mode 100644
index 00000000..3dd93f29
--- /dev/null
+++ b/engine/crates/concat-effects/packages/concat.falling-dust/effect.toml
@@ -0,0 +1,32 @@
+[effect]
+id = "concat.falling-dust"
+name = "Falling Dust"
+kind = "filter"
+category = "Retro"
+order = 34
+intensity = "dust"
+description = "A warm fade with dust drifting down through it and a light leak in one corner. The CPU shows the fade and a whisper of noise."
+
+[[param]]
+key = "dust"
+label = "Dust"
+min = 0
+max = 100
+default = 60
+step = 1
+unit = "%"
+
+[[param]]
+key = "leak"
+label = "Light leak"
+min = 0
+max = 100
+default = 50
+step = 1
+unit = "%"
+
+[ffmpeg]
+chain = "colorbalance=rh={fixed(leak / 100 * 0.12, 3)}:bh={fixed(0 - leak / 100 * 0.08, 3)},curves=all='0/0.04 1/0.97',noise=alls={round(dust / 100 * 8)}:allf=t"
+
+[wgsl]
+entry = "effect.wgsl"
diff --git a/engine/crates/concat-effects/packages/concat.falling-dust/effect.wgsl b/engine/crates/concat-effects/packages/concat.falling-dust/effect.wgsl
new file mode 100644
index 00000000..0bd518f5
--- /dev/null
+++ b/engine/crates/concat-effects/packages/concat.falling-dust/effect.wgsl
@@ -0,0 +1,36 @@
+struct Params { dust: f32, leak: f32 }
+
+// One mote: a soft dot drifting down the frame on its own lane, its lane,
+// size, speed and sway all hashed from its number, so no two agree and
+// the same frame always draws the same dust.
+fn mote(uv: vec2<f32>, k: f32) -> f32 {
+ let a = hash(vec2<f32>(k, 1.0), 3.0);
+ let b = hash(vec2<f32>(k, 2.0), 5.0);
+ let c = hash(vec2<f32>(k, 3.0), 7.0);
+ let speed = 0.02 + b * 0.05;
+ let y = fract(a - frame.time * speed);
+ let x = fract(c + sin(frame.time * (0.3 + a) + k) * 0.02);
+ let aspect = frame.size.x / max(frame.size.y, 1.0);
+ let d = vec2<f32>((uv.x - x) * aspect, uv.y - y);
+ let radius = 0.003 + b * 0.006;
+ return (1.0 - smoothstep(0.0, radius, length(d))) * (0.4 + c * 0.6);
+}
+
+fn effect(uv: vec2<f32>) -> vec4<f32> {
+ let c = sample(uv);
+ let leak = params.leak / 100.0;
+ let dust = params.dust / 100.0;
+ // The warm fade, then the leak: a wash from the top-right corner,
+ // screened over, the colour of light through a gap in the camera.
+ var out = fade(c.rgb, 0.04) * 0.97;
+ out = split_tone(out, vec3<f32>(0.0), vec3<f32>(0.12, 0.03, -0.08), leak);
+ let wash = (1.0 - smoothstep(0.0, 0.9, distance(uv, vec2<f32>(1.05, -0.1)))) * leak * 0.55;
+ out = vec3<f32>(1.0) - (vec3<f32>(1.0) - out) * (vec3<f32>(1.0) - vec3<f32>(1.0, 0.72, 0.4) * wash);
+ // The motes, a couple of dozen of them, brightest where the leak is.
+ var glow = 0.0;
+ for (var k: i32 = 0; k < 28; k++) {
+ glow += mote(uv, f32(k));
+ }
+ out = out + vec3<f32>(1.0, 0.95, 0.85) * min(glow, 1.0) * dust * 0.8;
+ return vec4<f32>(clamp01(out), c.a);
+}
diff --git a/engine/crates/concat-effects/packages/concat.falling-dust/fixtures.toml b/engine/crates/concat-effects/packages/concat.falling-dust/fixtures.toml
new file mode 100644
index 00000000..3585f3a5
--- /dev/null
+++ b/engine/crates/concat-effects/packages/concat.falling-dust/fixtures.toml
@@ -0,0 +1,13 @@
+[[case]]
+name = "default"
+chain = "colorbalance=rh=0.060:bh=-0.040,curves=all='0/0.04 1/0.97',noise=alls=5:allf=t"
+
+[[case]]
+name = "minimum"
+at = "min"
+chain = "colorbalance=rh=0.000:bh=0.000,curves=all='0/0.04 1/0.97',noise=alls=0:allf=t"
+
+[[case]]
+name = "maximum"
+at = "max"
+chain = "colorbalance=rh=0.120:bh=-0.080,curves=all='0/0.04 1/0.97',noise=alls=8:allf=t"
diff --git a/engine/crates/concat/locales/en.json b/engine/crates/concat/locales/en.json
index 8c57e052..62ec8dae 100644
--- a/engine/crates/concat/locales/en.json
+++ b/engine/crates/concat/locales/en.json
@@ -18,6 +18,7 @@
"A soft, even blur.": "A soft, even blur.",
"A solid band behind the words. Where a shadow softens the background, a plate replaces it — use it when the footage underneath is busy enough that neither weight nor outline will hold.": "A solid band behind the words. Where a shadow softens the background, a plate replaces it — use it when the footage underneath is busy enough that neither weight nor outline will hold.",
"A studio plate: dense, bright and short.": "A studio plate: dense, bright and short.",
+ "A warm fade with dust drifting down through it and a light leak in one corner. The CPU shows the fade and a whisper of noise.": "A warm fade with dust drifting down through it and a light leak in one corner. The CPU shows the fade and a whisper of noise.",
"About": "About",
"About {0}:{1} in {2} · {3} characters": "About {0}:{1} in {2} · {3} characters",
"Add": "Add",
@@ -169,6 +170,7 @@
"Drops every colour to grey.": "Drops every colour to grey.",
"Duplicate": "Duplicate",
"Duration": "Duration",
+ "Dust": "Dust",
"Echo": "Echo",
"Edit": "Edit",
"effect": "effect",
@@ -199,6 +201,7 @@
"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",
+ "Falling Dust": "Falling Dust",
"Faster": "Faster",
"Favourites": "Favourites",
"Feather": "Feather",
@@ -291,6 +294,7 @@
"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",
+ "Light leak": "Light leak",
"Lighten": "Lighten",
"Lightness": "Lightness",
"Line height": "Line height",
diff --git a/engine/crates/concat/ui/assets/effect-previews/falling-dust.jpg b/engine/crates/concat/ui/assets/effect-previews/falling-dust.jpg
new file mode 100644
index 00000000..e4bf286b
Binary files /dev/null and b/engine/crates/concat/ui/assets/effect-previews/falling-dust.jpg differ
diff --git a/engine/crates/concat/ui/workspace/media-pane.slint b/engine/crates/concat/ui/workspace/media-pane.slint
index 95e33a4d..13544881 100644
--- a/engine/crates/concat/ui/workspace/media-pane.slint
+++ b/engine/crates/concat/ui/workspace/media-pane.slint
@@ -1356,6 +1356,7 @@ export component MediaPane inherits Rectangle {
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"); }
+ if (id == "concat.falling-dust") { return @image-url("../assets/effect-previews/falling-dust.jpg"); }
return root.no-art;
}
/// The category column. In-out, because it is dragged.