diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index 8c8659c527a78d..1e0cd3650147e3 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -524,8 +524,8 @@ class KTX2Container { for ( var level = 0; level < this.header.levelCount; level ++ ) { - var levelWidth = Math.ceil( width / Math.pow( 2, level ) ); - var levelHeight = Math.ceil( height / Math.pow( 2, level ) ); + var levelWidth = Math.max( 1, Math.floor( width / Math.pow( 2, level ) ) ); + var levelHeight = Math.max( 1, Math.floor( height / Math.pow( 2, level ) ) ); var numImagesInLevel = 1; // TODO(donmccurdy): Support cubemaps, arrays and 3D. var imageOffsetInLevel = 0;