Interface: TextureFormatDecoder
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:43
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:70
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:65
"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:60
Returns information about a texture format, e.g. attachment type, components, byte length and flags (integer, signed, normalized)
Parameters
format
Returns
isColor()
isColor(
format):format is TextureFormatColor
Defined in: modules/core/src/shadertypes/texture-types/texture-format-decoder.ts:45
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:55
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:50
Checks if a texture format is depth or stencil
Parameters
format
Returns
format is TextureFormatDepthStencil