Skip to main content

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

TextureMemoryLayout


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

TextureFormat

Returns

TextureFormatCapabilities

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

TextureFormat

Returns

TextureFormatInfo


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

TextureFormat

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

TextureFormat

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

TextureFormat

Returns

format is TextureFormatDepthStencil