Log inGet started
Package

resample.computeShader

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

resample

Image resample of one or more slices (a Texture's texels, a Grid layer, each tile of a Raster) to a target size, with the FILTER specialization (bilinear, lanczos3, catmull_rom, nearest). Downscaling widens the filter by the shrink ratio so it averages what it drops. axis resamples width (0), height (1) or both (2); width then height gives the both-axes result up to float rounding. determinism: exact.

src holds slices images of sw x sh pixels, lanes f32 values a pixel, slice by slice with rows x fastest; dst holds the same layout at the output size (dw x sh, sw x dh or dw x dh) and is bound by the caller. The lanes laneBase to laneBase + laneCount - 1 (at most 16) are resampled and written; clampRange 1 holds each result to lo .. hi. One thread per output pixel of every slice, numbered gid.x + gid.y * num_workgroups.x * 64, so a dispatch past 65535 workgroups spreads over rows. The bindings are bound by list position.