2
0
Эх сурвалжийг харах

WebGLTextures: mipmapping now works with all texture types #18134

The call to generateMipmap() at the bottom of uploadTexture() was previously assuming _gl.TEXTURE_2D as the texture type, which broke automatic mipmapping for other texture types.
FunFetched 5 жил өмнө
parent
commit
b22224851a

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

@@ -805,7 +805,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 		if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {
 
-			generateMipmap( _gl.TEXTURE_2D, texture, image.width, image.height );
+			generateMipmap( textureType, texture, image.width, image.height );
 
 		}