diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index f1c2ed359ea799..3a2c1ca3727631 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -865,8 +865,8 @@ async function createRawTexture( container ) { if ( UNCOMPRESSED_FORMATS.has( FORMAT_MAP[ vkFormat ] ) ) { texture = container.pixelDepth === 0 - ? new DataTexture( mipmaps, container.pixelWidth, container.pixelHeight ) - : new Data3DTexture( mipmaps, container.pixelWidth, container.pixelHeight, container.pixelDepth ); + ? new DataTexture( mipmaps[ 0 ].data, container.pixelWidth, container.pixelHeight ) + : new Data3DTexture( mipmaps[ 0 ].data, container.pixelWidth, container.pixelHeight, container.pixelDepth ); } else { @@ -874,8 +874,6 @@ async function createRawTexture( container ) { texture = new CompressedTexture( mipmaps, container.pixelWidth, container.pixelHeight ); - - } texture.mipmaps = mipmaps;