ソースを参照

WebGLTextures: Only use anistropic filtering with certain `minFilter`/`magFilter` combinations. (#25068)

* fix: anisotropy got applied to textures with NEAREST filtering with inconsistent results

* fix conditions for when not to apply anisotropy
hybridherbst 2 年 前
コミット
f9403dcd2a
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/renderers/webgl/WebGLTextures.js

+ 2 - 0
src/renderers/webgl/WebGLTextures.js

@@ -574,6 +574,8 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 			const extension = extensions.get( 'EXT_texture_filter_anisotropic' );
 
+			if ( texture.magFilter === NearestFilter ) return;
+			if ( texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter ) return;
 			if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2
 			if ( isWebGL2 === false && ( texture.type === HalfFloatType && extensions.has( 'OES_texture_half_float_linear' ) === false ) ) return; // verify extension for WebGL 1 only