TypeError: KTX2DECODER.LiteTranscoder_UASTC_R8_UNORM is undefined

Trying to use ktx decoders from another location but get this.

Remove this code and it works as normal.

const cfg = BABYLON.KhronosTextureContainer2.URLConfig;
cfg.wasmUASTCToR8_UNORM = "https://preview.babylonjs.com/1/uastc_r8_unorm.wasm";
cfg.wasmUASTCToRG8_UNORM = 'https://preview.babylonjs.com/1/uastc_rg8_unorm.wasm';

The transcoder is not exported to the KTX2DECODER namespace:

Thanks for reporting, here’s the PR that will fix the problem:

3 Likes