mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-19 07:17:26 +00:00
gaussian_blur's box passes drop what they spread past the buffer's edge, so a blur wider than its buffer comes out far too faint: three boxes of radius 15000 on a 4096-pixel line keep about 3 % of the centre value per axis. gaussian_blur_unbounded gives the same three boxes as if the image continued with transparency, at O(length) per line whatever the sigma: each box is a difference of prefix sums, so three are eight terms of the third prefix sum, which is a polynomial past the line's ends. The sums are f64. The test compares it with gaussian_blur on a buffer padded past the blur's reach, up to sigma 15000 along each axis.