Skip to content

Sampler ​

Methods ​

create ​

Create the GPUSampler. Any address mode or filter left out of the options falls back to 'clamp-to-edge' and 'nearest' respectively.

ArgumentTypeRequiredDescription
deviceYesThe device to create the sampler on.
optionsGPUSamplerDescriptorNo(default: {})

extend ​

Method used to decorate a given object (publicAPI+model) with vtkWebGPUSampler characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUSamplerInitialValuesNo(default: {})

getBindGroupEntry ​

Get the bind group entry for this sampler. The binding index is filled in by the bind group.

getBindGroupLayoutEntry ​

Get the bind group layout entry describing this sampler.

getBindGroupTime ​

Get the object whose modified time changes when the sampler is created.

getDevice ​

Get the device the sampler belongs to.

getHandle ​

Get the GPUSampler.

getLabel ​

Get the WGSL name of the sampler.

getOptions ​

Get the descriptor the sampler was created with.

getShaderCode ​

Get the WGSL declaration of this sampler.

ArgumentTypeRequiredDescription
bindingYesThe binding index.
groupYesThe bind group index.

newInstance ​

Method used to create a new instance of vtkWebGPUSampler.

ArgumentTypeRequiredDescription
initialValuesIWebGPUSamplerInitialValuesNofor pre-setting some of its content

setBindGroupLayoutEntry ​

Set the bind group layout entry describing this sampler.

setDevice ​

Set the device the sampler belongs to.

setLabel ​

Set the WGSL name of the sampler.