Browse Source

Compressed textures with a single mip level have to use Linear min filter, instead of the default Mip filter.

tstanev 11 years ago
parent
commit
50ab5a4d92
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/loaders/CompressedTextureLoader.js

+ 8 - 2
src/loaders/CompressedTextureLoader.js

@@ -41,12 +41,15 @@ THREE.CompressedTextureLoader.prototype = {
 						height: texDatas.height,
 						format: texDatas.format,
 						mipmaps: texDatas.mipmaps
-					}
+					};
 
 					loaded += 1;
 
 					if ( loaded === 6 ) {
 
+ 						if (texDatas.mipmapCount == 1)
+ 							texture.minFilter = THREE.LinearFilter;
+
 						texture.format = texDatas.format;
 						texture.needsUpdate = true;
 
@@ -56,7 +59,7 @@ THREE.CompressedTextureLoader.prototype = {
 
 				} );
 
-			}
+			};
 
 			for ( var i = 0, il = url.length; i < il; ++ i ) {
 
@@ -99,6 +102,9 @@ THREE.CompressedTextureLoader.prototype = {
 
 				}
 
+				if (texDatas.mipmapCount == 1)
+	 				texture.minFilter = THREE.LinearFilter;
+
 				texture.format = texDatas.format;
 				texture.needsUpdate = true;