diff --git a/crates/engine/src/tests_timeline.rs b/crates/engine/src/tests_timeline.rs index bbd9e453..0af232b1 100644 --- a/crates/engine/src/tests_timeline.rs +++ b/crates/engine/src/tests_timeline.rs @@ -973,6 +973,7 @@ fn add_item_keeps_footage_longer_than_the_comp_at_full_length() { let f = effectcraft_project::Footage { width: 100, height: 100, + kind: effectcraft_project::FootageKind::Video, has_video: true, duration: effectcraft_time::Tick::from_seconds_f64(10.0), ..Default::default() diff --git a/crates/gpu/src/fx_time.rs b/crates/gpu/src/fx_time.rs index e7fd628a..71f7a582 100644 --- a/crates/gpu/src/fx_time.rs +++ b/crates/gpu/src/fx_time.rs @@ -45,11 +45,17 @@ pub(crate) fn apply(e: &mut Enc, id: &str, ctx: &EffectCtx, b: GBuf) -> Option>()) } - // Pixel Motion Blur synthesizes along measured motion vectors (#535); a plan that - // cannot be built (no host) declines to the CPU effect. + // Pixel Motion Blur synthesizes along measured motion vectors (#535); without a plan (no + // host to read neighbouring frames) it averages the shutter's frames, as the CPU effect does. "ec.time.pixelmotionblur" => match effectcraft_effects::pmb_plan(ctx) { Some(plan) => render_plan(e, &plan), - None => None, + None => { + let angle = if ctx.params.e("shutterControl") == 1 { ctx.params.f("shutterAngle") } else { 180.0 }; + let n = ctx.params.f("shutterSamples").round().clamp(1.0, 64.0) as usize; + let span = angle.clamp(0.0, 720.0) / 360.0 / ctx.fps(); + let times: Vec = (0..n).map(|i| ctx.time - span * 0.5 + if n > 1 { span * i as f64 / (n - 1) as f64 } else { span * 0.5 }).collect(); + mean_of(e, ctx, b, ×) + } }, "ec.time.timewarp" => timewarp(e, ctx, b), _ => None, diff --git a/docs/effects.md b/docs/effects.md index 0fac41ed..7b8f479e 100644 --- a/docs/effects.md +++ b/docs/effects.md @@ -3,7 +3,7 @@ -EffectCraft ships 306 effects with 3014 parameters in total, grouped into the same categories as the Effects & Presets panel. Every effect is our own implementation, written from public behaviour descriptions and standard image-processing literature. Parameter names, order, popup options, units, defaults and ranges follow the reference application so that projects, expressions and muscle memory carry over. +EffectCraft ships 306 effects with 3017 parameters in total, grouped into the same categories as the Effects & Presets panel. Every effect is our own implementation, written from public behaviour descriptions and standard image-processing literature. Parameter names, order, popup options, units, defaults and ranges follow the reference application so that projects, expressions and muscle memory carry over. - **GPU**: 280 effects also run on the GPU compositor with identical results. - **32**: 306 effects process 32-bit float (HDR, overbright) pixels without clamping.