mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-11 02:41:57 -06:00
Gaussian Blur: the bit-identity test covers tiles past the first
A 300-pixel-wide case runs the row-by-row pass over tiles at x 128 and 256 and a partial last tile.
This commit is contained in:
@@ -339,9 +339,10 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn gauss_pass_is_bit_identical_to_the_per_pixel_kernel() {
|
||||
// Sizes narrower and shorter than the kernel too (every tap near an edge), with
|
||||
// negative, zero and HDR values.
|
||||
for (w, h) in [(37, 23), (3, 2), (1, 9), (64, 1)] {
|
||||
// Sizes narrower and shorter than the kernel too (every tap near an edge), one wider
|
||||
// than three tiles (tiles past the first, and a partial last one), with negative, zero
|
||||
// and HDR values.
|
||||
for (w, h) in [(37, 23), (3, 2), (1, 9), (64, 1), (300, 5)] {
|
||||
let mut img = Image::new(w, h);
|
||||
for (i, p) in img.data.iter_mut().enumerate() {
|
||||
let v = ((i * 7919) % 101) as f32 / 37.0 - 0.6;
|
||||
|
||||
Reference in New Issue
Block a user