TextureBinding constructor
parameters used to create our TextureBinding
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 TextureBinding
Our TextureBinding resource, i.e. a GPUTexture or GPUExternalTexture
An array of strings to append to our shaders code declaring all the WGSL variables representing this TextureBinding
Options used to create this TextureBinding
Get bind group layout entry resource, either for GPUBindGroupLayoutEntry#texture | texture or GPUBindGroupLayoutEntry#externalTexture | external texture
Get the resource cache key
Get the GPUBindGroupEntry#resource | bind group resource
Set the GPUBindGroupEntry#resource | bind group resource
new bind group resource
Set or update our bindingType and our WGSL code snippet
the new binding type
Set or update our texture format. Note that if the texture is a storage
bindingType and the format
value is different from the previous one, the associated GPU bind group layout will be recreated.
new texture format value to use
Set or update our texture multisampled. Note that if the texture is not a storage
bindingType and the multisampled
value is different from the previous one, the associated GPU bind group layout will be recreated.
new texture multisampled value to use
Used to handle GPUTexture and GPUExternalTexture bindings.
Provide both resourceLayout and resource to the GPUBindGroupLayout and GPUBindGroup.
Also create the appropriate WGSL code snippet to add to the shaders.