TexelRepresentationInfo: {
    bitsToNumber: ComponentMapFn;
    bitsToULPFromZero: ComponentMapFn;
    componentInfo: PerTexelComponent<{
        bitLength: number;
        dataType: ComponentDataType;
    }>;
    componentOrder: TexelComponent[];
    decode: ComponentMapFn;
    encode: ComponentMapFn;
    numberToBits: ComponentMapFn;
    numericRange: null | {
        finiteMax: number | PerComponentFiniteMax;
        finiteMin: number;
        max: number;
        min: number;
    };
    pack: ComponentPackFn;
    unpackBits: ComponentUnpackFn;
}

Type declaration

  • Readonly bitsToNumber: ComponentMapFn

    Convert integer bit representations into numeric values, e.g. unorm8 255 -> numeric 1.0

  • Readonly bitsToULPFromZero: ComponentMapFn

    Convert integer bit representations into ULPs-from-zero, e.g. unorm8 255 -> 255 ULPs

  • Readonly componentInfo: PerTexelComponent<{
        bitLength: number;
        dataType: ComponentDataType;
    }>

    Data type and bit length of each component in the format.

  • Readonly componentOrder: TexelComponent[]

    Order of components in the packed representation.

  • Readonly decode: ComponentMapFn

    Decode the data representation into the shader values. ex.) unorm8 255 -> float 1.0

  • Readonly encode: ComponentMapFn

    Encode shader values into their data representation. ex.) float 1.0 -> unorm8 255

  • Readonly numberToBits: ComponentMapFn

    Convert numeric values into integer bit representations, e.g. numeric 1.0 -> unorm8 255

  • Readonly numericRange: null | {
        finiteMax: number | PerComponentFiniteMax;
        finiteMin: number;
        max: number;
        min: number;
    }

    The valid range of numeric "color" values, e.g. [0, Infinity] for ufloat.

  • Readonly pack: ComponentPackFn

    Pack texel component values into an ArrayBuffer. ex.) rg8unorm {r: 0, g: 255} -> 0xFF00

  • Readonly unpackBits: ComponentUnpackFn

    Unpack integer bit representations from an ArrayBuffer, e.g. 0xFF00 -> rg8unorm [0,255]

Generated using TypeDoc