Function getBlockInfoForEncodableTextureFormat

  • Gets the block width, height, and bytes per block for an encodable texture format. This is for encodable textures only. For all texture formats

    Parameters

    • format: "bgra8unorm" | "rgba8unorm" | "rgba16float" | "r8unorm" | "r8snorm" | "r8uint" | "r8sint" | "r16uint" | "r16sint" | "r16float" | "rg8unorm" | "rg8snorm" | "rg8uint" | "rg8sint" | "r32uint" | "r32sint" | "r32float" | "rg16uint" | "rg16sint" | "rg16float" | "rgba8unorm-srgb" | "rgba8snorm" | "rgba8uint" | "rgba8sint" | "bgra8unorm-srgb" | "rgb9e5ufloat" | "rgb10a2uint" | "rgb10a2unorm" | "rg11b10ufloat" | "rg32uint" | "rg32sint" | "rg32float" | "rgba16uint" | "rgba16sint" | "rgba32uint" | "rgba32sint" | "rgba32float" | "stencil8" | "depth16unorm" | "depth32float"

    Returns {
        blockHeight: 1;
        blockWidth: 1;
        bytesPerBlock: 1 | 2 | 4 | 8 | 16;
    }

    • blockHeight: 1
    • blockWidth: 1
    • bytesPerBlock: 1 | 2 | 4 | 8 | 16

    See

    getBlockInfoForTextureFormat The point of this function is bytesPerBlock is always defined so no need to check that it's not vs getBlockInfoForTextureFormat where it may not be defined.

Generated using TypeDoc