pub fn box_blur_gpu(
runtime: &WgpuRuntime,
source: &GpuImage,
kernel_width: u32,
kernel_height: u32,
border: GpuImageBorder,
) -> SpatialResult<GpuImage>Expand description
Applies an integer mean box blur to a single-channel GpuImage.
Positive odd kernels round half upward once after summing the entire box. Boxes with area at least 81 and at least 65,536 total pixel/sample visits use two passes. Widths up to 257 pack two exact horizontal sums per u32 (four scratch bytes per pixel pair); wider kernels keep four bytes per pixel. Smaller workloads use one pass. Transfers stay explicit and bounded.