From 9199fc20b3e513a567af6413bc40f4abe6bc6cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Lu=C3=ADs=20da=20Silva?= Date: Fri, 23 Oct 2026 12:29:01 -0300 Subject: [PATCH] effects: keep CC Radial Fast Blur's pad within 4096 including the extra pixel (#2095) --- crates/effects/src/blur2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/effects/src/blur2.rs b/crates/effects/src/blur2.rs index 0e8c748a..929f4155 100644 --- a/crates/effects/src/blur2.rs +++ b/crates/effects/src/blur2.rs @@ -516,7 +516,7 @@ fn camera_lens_blur(ctx: &EffectCtx, mut b: Buf) -> Buf { pub fn radial_fast_pad(c: (f64, f64), w: u32, h: u32, s: f64) -> u32 { let (w, h) = (f64::from(w), f64::from(h)); let far = [(0.0, 0.0), (w, 0.0), (0.0, h), (w, h)].iter().map(|&(x, y)| (x - c.0).hypot(y - c.1)).fold(0.0, f64::max); - (far * s / (1.0 - s)).ceil().min(4096.0) as u32 + 1 + ((far * s / (1.0 - s)).ceil() + 1.0).min(4096.0) as u32 } fn radial_fast_blur(ctx: &EffectCtx, mut b: Buf) -> Buf {