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.
| Argument | Type | Required | Description |
|---|---|---|---|
device | Yes | The device to create the sampler on. | |
options | GPUSamplerDescriptor | No | (default: {}) |
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPUSampler characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IWebGPUSamplerInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
binding | Yes | The binding index. | |
group | Yes | The bind group index. |
newInstance
Method used to create a new instance of vtkWebGPUSampler.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPUSamplerInitialValues | No | for 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.