Browse Source

Fixed issue with DDS textures and the uncompressed RGB format.

Brett Lawson 11 years ago
parent
commit
2e751ae0a4
1 changed files with 1 additions and 1 deletions
  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 ++ ) {
 			for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
 
 
 				mipmap = mipmaps[ 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 );
 					_gl.compressedTexImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
 				} else {
 				} else {
 					_gl.texImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );
 					_gl.texImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );