Interface: TextureFormatDecoder
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:44
Class that helps applications work with texture formats
Methods
computeMemoryLayout()
computeMemoryLayout(
opts):TextureMemoryLayout
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:80
Computes the memory layout for a texture, in particular including row byte alignment
Parameters
opts
TextureMemoryLayoutOptions
Returns
getCapabilities()
getCapabilities(
format):TextureFormatCapabilities
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:66
"static" capabilities of a texture format.
Parameters
format
Returns
Note
Needs to be adjusted against current device
getInfo()
getInfo(
format):TextureFormatInfo
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:61
Returns information about a texture format, e.g. attachment type, components, byte length and flags (integer, signed, normalized)
Parameters
format
Returns
getWebGPUCapabilities()
getWebGPUCapabilities(
format):number
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:71
Returns the compact WebGPU capability mask stored in the canonical format table.
Parameters
format
Returns
number
isColor()
isColor(
format):format is TextureFormatColor
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:46
Checks if a texture format is color
Parameters
format
Returns
format is TextureFormatColor
isCompressed()
isCompressed(
format):format is TextureFormatCompressed
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:56
Checks if a texture format is compressed
Parameters
format
Returns
format is TextureFormatCompressed
isDepthStencil()
isDepthStencil(
format):format is TextureFormatDepthStencil
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:51
Checks if a texture format is depth or stencil
Parameters
format
Returns
format is TextureFormatDepthStencil