Explorar o código

open code log2 replacement for IE11 compat

aardgoose %!s(int64=7) %!d(string=hai) anos
pai
achega
c68ef6c214
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/renderers/webgl/WebGLTextures.js

+ 1 - 1
src/renderers/webgl/WebGLTextures.js

@@ -93,7 +93,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 		_gl.generateMipmap( target );
 
 		var textureProperties = properties.get( texture );
-		textureProperties.__maxMipLevel = Math.log2( Math.max( width, height ) );
+		textureProperties.__maxMipLevel = Math.log( Math.max( width, height ) ) * Math.LOG2E;
 
 	}