Optional
filterThe name of the filter to use for downsampling the given texture. Should be one of the filters registered with WebGPUSinglePassDownsampler. Defaults to SPDFilters.Average.
Optional
halfIf set to true, will try to use half-precision floats (f16
) for this combination of texture format and filters.
Falls back to full precision, if half precision is requested but not supported by the device (feature 'shader-f16' not enabled).
Falls back to full precision, if the texture format is not a float format.
Defaults to false.
Optional
numThe number of mipmaps to generate. Defaults to target.mipLevelCount.
Optional
offsetThe upper left corner of the image region mipmaps should be generated for. Defaults to [0,0].
Optional
sizeThe size of the image reagion mipmaps should be generated for. Default to [texture.width - 1 - offset[0], texture.height - 1 - offset[1]].
Optional
targetThe target texture the generated mipmaps are written to. Its usage must include GPUTextureUsage.STORAGE_BINDING. Its format must support GPUStorageTextureAccess:"write-only". Its size must be big enough to store the first mip level generated for the input texture. It must support generating a GPUTextureView with GPUTextureViewDimension:"2d-array". Defaults to the given input texture.
Configuration for WebGPUSinglePassDownsampler.preparePass.