Procházet zdrojové kódy

KTX2Loader: Fix .minFilter default for untranscoded compressed textures (#29904)

Don McCurdy před 1 rokem
rodič
revize
5b51d6f1e0
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      examples/jsm/loaders/KTX2Loader.js

+ 3 - 0
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;

粤ICP备19079148号