Skip to content

Commit 99244cd

Browse files
authored
Merge pull request #13519 from takahirox/WebGLTextureUpdate
Clean up WebGLTexture
2 parents ac3b5be + f5bf590 commit 99244cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/renderers/webgl/WebGLTextures.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
8585

8686
_gl.generateMipmap( target );
8787

88+
// We assume images for cube map have the same size.
8889
var image = Array.isArray( texture.image ) ? texture.image[ 0 ] : texture.image;
8990
var textureProperties = properties.get( texture );
90-
textureProperties.__maxMipLevel = Math.max( Math.log2( Math.max( image.width, image.height ) ), textureProperties.__maxMipLevel );
91+
textureProperties.__maxMipLevel = Math.log2( Math.max( image.width, image.height ) );
9192

9293
}
9394

0 commit comments

Comments
 (0)