GPUTextureDescriptor¶
interface GPUTextureDescriptor : GPUObjectDescriptorBase
Properties¶
dimension¶
abstract val dimension: GPUTextureDimension
Whether the texture is one-dimensional, an array of two-dimensional layers, or three-dimensional.
format¶
abstract val format: GPUTextureFormat
The format of the texture.
See [GPUTextureDescriptor.format in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gputexturedescriptor-format).
label¶
The initial value of GPUObjectBase.label.
See [GPUObjectDescriptorBase.label in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpuobjectdescriptorbase-label).
mipLevelCount¶
abstract val mipLevelCount: GPUIntegerCoordinate
The number of mip levels the texture will contain.
See [GPUTextureDescriptor.mipLevelCount in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gputexturedescriptor-miplevelcount).
sampleCount¶
abstract val sampleCount: GPUSize32
The sample count of the texture. A sampleCount > 1 indicates a multisampled texture.
size¶
abstract val size: GPUExtent3D
The width, height, and depth or layer count of the texture.
textureBindingViewDimension¶
abstract val textureBindingViewDimension: GPUTextureViewDimension?
On devices with "core-features-and-limits", this is ignored, and there is no such restriction.
usage¶
abstract val usage: GPUTextureUsage
The allowed usages for the texture.
See [GPUTextureDescriptor.usage in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gputexturedescriptor-usage).
viewFormats¶
abstract val viewFormats: List<GPUTextureFormat>
Specifies what view format values will be allowed when calling createView() on this texture (in addition to the texture’s actual format). Formats in this list must be texture view format compatible with the texture format.