Explorar o código

Fixed issue with DDS textures and the uncompressed RGB format.

Brett Lawson %!s(int64=11) %!d(string=hai) anos
pai
achega
2e751ae0a4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -5594,7 +5594,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 			for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
 
 				mipmap = mipmaps[ i ];
-				if ( texture.format !== THREE.RGBAFormat ) {
+				if ( texture.format !== THREE.RGBAFormat && texture.format !== THREE.RGBFormat ) {
 					_gl.compressedTexImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
 				} else {
 					_gl.texImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );