Function uploadKtx2Texture2DArray
-
uploadKtx2Texture2DArray(
engine: EngineContext,
buffer: ArrayBuffer,
sRGB?: boolean,
): Promise<Texture2DArray>Parameters
- engine: EngineContext
Engine context.
- buffer: ArrayBuffer
Raw
.ktx2file bytes withlayerCount>= 1. - sRGB: boolean = false
Select the
*-srgbGPU format. Default false.
Returns Promise<Texture2DArray>
- engine: EngineContext
Decode an in-memory multi-layer KTX2 container and upload every layer of its mip chain to a
Texture2DArray. The buffer counterpart to loadKtx2Texture2DArray — use it when the bytes are already in hand (an ArrayBuffer from a zip, an XHR, or a glTF binary chunk). Unlike the compatibility-orientedcreateTexture2DArrayFromKtx2, this native path preserves the decoder-selected GPU format and every authored mip instead of forcing RGBA8 and regenerating mips.