소스 검색

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 년 전
부모
커밋
b22224851a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/renderers/webgl/WebGLTextures.js

+ 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 );
 
 		}