Interface GPUTextureDescriptor

Hierarchy

Properties

Whether the texture is one-dimensional, an array of two-dimensional layers, or three-dimensional.

The format of the texture.

label?: string

The initial value of GPUObjectBase#labe | PUObjectBase.label.

mipLevelCount?: number

The number of mip levels the texture will contain.

sampleCount?: number

The sample count of the texture. A sampleCount > 1 indicates a multisampled texture.

The width, height, and depth or layer count of the texture.

usage: number

The allowed usages for the texture.

viewFormats?: Iterable<GPUTextureFormat>

Specifies what view format values will be allowed when calling createView on this texture (in addition to the texture's actual format).

Adding a format to this list may have a significant performance impact, so it is best to avoid adding formats unnecessarily. The actual performance impact is highly dependent on the target system; developers must test various systems to find out the impact on their particular application. For example, on some systems any texture with a format or viewFormats entry including GPUTextureFormat#"rgba8unorm-srgb" will perform less optimally than a GPUTextureFormat#"rgba8unorm" texture which does not. Similar caveats exist for other formats and pairs of formats on other systems.
Formats in this list must be texture view format compatible with the texture format.
Two GPUTextureFormats `format` and `viewFormat` are texture view format compatible if: - `format` equals `viewFormat`, or - `format` and `viewFormat` differ only in whether they are `srgb` formats (have the `-srgb` suffix).

Generated using TypeDoc