Create a new instance.
The name of the texture.
A bit-flag that specifies the shader stages in which the texture is visible. Can be:
OptionaltextureDimension: string = TEXTUREDIMENSION_2D
The dimension of the texture. Defaults to TEXTUREDIMENSION_2D. Can be:
When multisampled is true, must be TEXTUREDIMENSION_2D.
OptionalsampleType: number = SAMPLETYPE_FLOAT
The type of the texture samples. Defaults to SAMPLETYPE_FLOAT. Can be:
When multisampled is true, SAMPLETYPE_FLOAT is coerced to
SAMPLETYPE_UNFILTERABLE_FLOAT (WebGPU rejects sampleType: "float" on a
multisampled binding).
OptionalhasSampler: boolean = true
True if the sampler for the texture is needed. Note that if the
sampler is used, it will take up an additional slot, directly following the texture slot.
Defaults to true. Forced to false when multisampled is true.
OptionalsamplerName: string | null = null
Sampler uniform name. If omitted, generated as
${name}_sampler. Ignored and stored as null when multisampled is true.
Optionalmultisampled: boolean = false
True if this is a multisampled texture binding
(texture_multisampled_2d / texture_depth_multisampled_2d). When set, hasSampler is
forced to false and samplerName to null (WGSL only allows textureLoad, and a WebGPU
multisampled texture binding cannot be paired with a sampler). Defaults to false.
Whether a sampler binding follows this texture. Always false when multisampled is true.
Whether this is a multisampled (texture_multisampled_*) binding.
Sampler uniform name. null when multisampled is true; otherwise the provided name or
${name}_sampler.
A class to describe the format of the texture for BindGroupFormat.