From 416b25b1b69f5ada79e05459cbb6476bce49840a Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Fri, 15 Nov 2024 14:11:00 -0500 Subject: [PATCH] KTX2Loader: Fix .minFilter default for untranscoded compressed textures --- examples/jsm/loaders/KTX2Loader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index d329cd753c1dcf..b11ae7424b4f78 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -988,6 +988,9 @@ async function createRawTexture( container ) { texture = new CompressedTexture( mipmaps, container.pixelWidth, container.pixelHeight ); + texture.minFilter = mipmaps.length === 1 ? LinearFilter : LinearMipmapLinearFilter; + texture.magFilter = LinearFilter; + } texture.mipmaps = mipmaps;