SamplerBinding constructor
parameters used to create our SamplerBindings
The label of the Binding.
The name/key of the Binding.
The visibility of the Binding in the shaders.
Flag indicating whether we should recreate the parentMesh bind group, usually when a resource has changed.
Flag indicating whether we should recreate the parentMesh GPU bind group layout, usually when a resource layout has changed.
A cache key allowing to get / set bindings from the device manager map cache. Used for BufferBinding only at the moment.
The binding type of the SamplerBinding
Our SamplerBinding resource, i.e. a GPUSampler
An array of strings to append to our shaders code declaring all the WGSL variables representing this SamplerBinding
Options used to create this SamplerBinding
bind group layout resource
Get the resource cache key
new bind group resource
Used to handle GPUSampler bindings.
Provide both resourceLayout and resource to the GPUBindGroupLayout and GPUBindGroup.
Also create the appropriate WGSL code snippet to add to the shaders.