Explorar o código

Allowing anisotropy for floating point textures if linear interpolation is supported

Michael Bond %!s(int64=10) %!d(string=hai) anos
pai
achega
aa981b4c70
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/renderers/WebGLRenderer.js

+ 5 - 1
src/renderers/WebGLRenderer.js

@@ -2852,7 +2852,11 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		extension = extensions.get( 'EXT_texture_filter_anisotropic' );
 
-		if ( extension && texture.type !== THREE.FloatType && texture.type !== THREE.HalfFloatType ) {
+		if ( extension ) {
+			if ( texture.type === THREE.FloatType && !extensions.get( 'OES_texture_float_linear' ) ||
+					texture.type === THREE.HalfFloatType && !extensions.get( 'OES_texture_half_float_linear' ) ) {
+				return;
+			}
 
 			if ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) {
 

粤ICP备19079148号