diff --git a/crates/effects/src/misc.rs b/crates/effects/src/misc.rs index ea196fc11..69a30505a 100644 --- a/crates/effects/src/misc.rs +++ b/crates/effects/src/misc.rs @@ -1151,7 +1151,8 @@ mod tests { /// Amount takes After Effects' valid range up to 1000 (#3467), Zoom 1000 a spread of 10. /// Zoom samples along the ray from the centre through the pixel, never past the centre: on a /// layer white left of the centre and black right of it, the right half stays black (scales - /// below 0 sampled the white half mirrored through the centre). Both Antialiasing settings. + /// below 0 sampled the white half mirrored through the centre). Both Antialiasing settings (the + /// renderer does not read it yet; the test keeps both covered). #[test] fn radial_blur_zoom_at_the_largest_amount_stays_on_its_side_of_the_centre() { let mut img = effectcraft_raster::Image::filled(64, 32, [0.0, 0.0, 0.0, 1.0]); @@ -1169,7 +1170,8 @@ mod tests { } /// Spin and Zoom at both ends of Amount (0..1000) and both Antialiasing settings give finite - /// colours over an opaque layer and keep it opaque (#3467). + /// colours over an opaque layer and keep it opaque (#3467). It guards the newly accepted + /// values; it passed before the Zoom fix too. #[test] fn radial_blur_is_finite_across_the_amount_range() { let mut img = effectcraft_raster::Image::new(48, 40); diff --git a/crates/gpu/src/fx_generate.rs b/crates/gpu/src/fx_generate.rs index 6e9594f60..8833e4d46 100644 --- a/crates/gpu/src/fx_generate.rs +++ b/crates/gpu/src/fx_generate.rs @@ -107,7 +107,7 @@ fn radial_blur(e: &mut Enc, ctx: &EffectCtx, b: GBuf) -> Option { if zoom { data.push(effectcraft_raster::radial_blur_zoom_scale(i, amount) as f32); } else { - let (s, c) = effectcraft_raster::radial_blur_spin_angle(i, amount).to_radians().sin_cos(); + let (s, c) = effectcraft_raster::radial_blur_spin_degrees(i, amount).to_radians().sin_cos(); data.extend([s as f32, c as f32]); } } diff --git a/crates/raster/src/blur.rs b/crates/raster/src/blur.rs index 751e0f5d0..9c9e7ec34 100644 --- a/crates/raster/src/blur.rs +++ b/crates/raster/src/blur.rs @@ -310,14 +310,15 @@ fn radial_blur_t(i: usize) -> f64 { } /// Spin sample `i`'s rotation in degrees for a spin of `amount` degrees. -pub fn radial_blur_spin_angle(i: usize, amount: f64) -> f64 { +pub fn radial_blur_spin_degrees(i: usize, amount: f64) -> f64 { radial_blur_t(i) * amount } /// Zoom sample `i`'s scale about the centre for a zoom of `amount` (a fraction of the distance /// to the centre): evenly over `1 ± amount / 2`. Past a spread of 2 (Radial Blur's Amount 200) /// that would reach below 0 and sample the point mirrored through the centre, so the samples -/// spread evenly from the centre (0) to `1 + amount / 2` instead (#3467). +/// spread evenly from the centre (0) to `1 + |amount| / 2` instead (#3467). That wider shape is +/// EffectCraft's; After Effects has not been measured past Amount 200. pub fn radial_blur_zoom_scale(i: usize, amount: f64) -> f64 { let t = radial_blur_t(i); if amount.abs() <= 2.0 { @@ -342,7 +343,7 @@ pub fn radial_blur(img: &Image, center: (f64, f64), amount: f64, zoom: bool) -> let k = radial_blur_zoom_scale(i, amount); (center.0 + vx * k, center.1 + vy * k) } else { - let (s, c) = radial_blur_spin_angle(i, amount).to_radians().sin_cos(); + let (s, c) = radial_blur_spin_degrees(i, amount).to_radians().sin_cos(); (center.0 + vx * c - vy * s, center.1 + vx * s + vy * c) }; // Samples outside the image repeat its edge: After Effects' Radial Blur keeps a diff --git a/crates/raster/src/lib.rs b/crates/raster/src/lib.rs index 852065db4..58feead1a 100644 --- a/crates/raster/src/lib.rs +++ b/crates/raster/src/lib.rs @@ -18,7 +18,7 @@ use effectcraft_color::{BlendMode, blend_pixel}; use rayon::prelude::*; pub use blur::{ - RADIAL_BLUR_SAMPLES, box_blur, directional_blur, gaussian_blur, gaussian_blur_exact, gaussian_is_exact, radial_blur, radial_blur_spin_angle, + RADIAL_BLUR_SAMPLES, box_blur, directional_blur, gaussian_blur, gaussian_blur_exact, gaussian_is_exact, radial_blur, radial_blur_spin_degrees, radial_blur_zoom_scale, }; pub use channels3d::AuxChannels; diff --git a/docs/effects-parity.md b/docs/effects-parity.md index 9d6ca232f..1ef31c413 100644 --- a/docs/effects-parity.md +++ b/docs/effects-parity.md @@ -64,7 +64,7 @@ the GPU is performance, not parity. | Date | Change | Summary | |---|---|---| -| 2026-11-17 | minor | Radial Blur: Amount takes After Effects' valid range 0..1000 (slider and default unchanged); Zoom past 200 spreads its samples from the centre outwards instead of sampling the layer mirrored through the centre (CPU and GPU) | +| 2026-11-17 | minor | Radial Blur: Amount takes After Effects' valid range 0..1000 (slider and default unchanged); Zoom past 200 spreads its samples from the centre outwards instead of sampling the layer mirrored through the centre (CPU and GPU; not yet measured against After Effects past Amount 200) | | 2026-11-12 | minor | Parameters take After Effects' recorded valid ranges (hard range; defaults and sliders unchanged): Levels (Individual Controls) levels −10000..10000 and Gamma from 0; 4-Color Gradient Blend to 10000 and Jitter to 500 %; Change Color Hue Transform ±1800°; Noise HLS (and Auto) amounts to 1000 % and Grain Size from 0; Grid Border to 2000; Venetian Blinds Width 1..32000 and Feather to 32000; Radial Wipe Feather to 32000; Scatter Amount to 1000; Beam thicknesses to 4000; Transform Scale ±30000 %; Turbulent Displace Random Seed to 100000. A test checks every mapped parameter's range against the recorded table (CPU and GPU) | | 2026-10-19 | minor | Glow (original colours): bright pass per channel, 8 × (value − threshold + 0.061), measured against After Effects 2026 (CPU and GPU) | | 2026-10-19 | minor | Glow (colour channels): the glow covers the layer's blurred alpha, blur σ = 0.384 × radius, measured against After Effects 2026 renders (CPU and GPU) |