Răsfoiți Sursa

Updated builds.

Mr.doob 4 ani în urmă
părinte
comite
4e868117e8
3 a modificat fișierele cu 16 adăugiri și 4 ștergeri
  1. 7 2
      build/three.js
  2. 0 0
      build/three.min.js
  3. 9 2
      build/three.module.js

+ 7 - 2
build/three.js

@@ -17693,7 +17693,9 @@
 			extensions = new WebGLExtensions(_gl);
 			extensions = new WebGLExtensions(_gl);
 			capabilities = new WebGLCapabilities(_gl, extensions, parameters);
 			capabilities = new WebGLCapabilities(_gl, extensions, parameters);
 
 
-			if (capabilities.isWebGL2 === false) {
+			if (capabilities.isWebGL2) {
+				extensions.get('EXT_color_buffer_float');
+			} else {
 				extensions.get('WEBGL_depth_texture');
 				extensions.get('WEBGL_depth_texture');
 				extensions.get('OES_texture_float');
 				extensions.get('OES_texture_float');
 				extensions.get('OES_texture_half_float');
 				extensions.get('OES_texture_half_float');
@@ -17705,6 +17707,7 @@
 			}
 			}
 
 
 			extensions.get('OES_texture_float_linear');
 			extensions.get('OES_texture_float_linear');
+			extensions.get('EXT_color_buffer_half_float');
 			utils = new WebGLUtils(_gl, extensions, capabilities);
 			utils = new WebGLUtils(_gl, extensions, capabilities);
 			state = new WebGLState(_gl, extensions, capabilities);
 			state = new WebGLState(_gl, extensions, capabilities);
 			state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());
 			state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());
@@ -18786,9 +18789,11 @@
 						return;
 						return;
 					}
 					}
 
 
+					var halfFloatSupportedByExt = textureType === HalfFloatType && (extensions.get('EXT_color_buffer_half_float') || capabilities.isWebGL2 && extensions.get('EXT_color_buffer_float'));
+
 					if (textureType !== UnsignedByteType && utils.convert(textureType) !== _gl.getParameter(35738) && // IE11, Edge and Chrome Mac < 52 (#9513)
 					if (textureType !== UnsignedByteType && utils.convert(textureType) !== _gl.getParameter(35738) && // IE11, Edge and Chrome Mac < 52 (#9513)
 					!(textureType === FloatType && (capabilities.isWebGL2 || extensions.get('OES_texture_float') || extensions.get('WEBGL_color_buffer_float'))) && // Chrome Mac >= 52 and Firefox
 					!(textureType === FloatType && (capabilities.isWebGL2 || extensions.get('OES_texture_float') || extensions.get('WEBGL_color_buffer_float'))) && // Chrome Mac >= 52 and Firefox
-					!(textureType === HalfFloatType && (capabilities.isWebGL2 ? extensions.get('EXT_color_buffer_float') : extensions.get('EXT_color_buffer_half_float')))) {
+					!halfFloatSupportedByExt) {
 						console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.');
 						console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.');
 						return;
 						return;
 					}
 					}

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
build/three.min.js


+ 9 - 2
build/three.module.js

@@ -23530,7 +23530,11 @@ function WebGLRenderer( parameters ) {
 
 
 		capabilities = new WebGLCapabilities( _gl, extensions, parameters );
 		capabilities = new WebGLCapabilities( _gl, extensions, parameters );
 
 
-		if ( capabilities.isWebGL2 === false ) {
+		if ( capabilities.isWebGL2 ) {
+
+			extensions.get( 'EXT_color_buffer_float' );
+
+		} else {
 
 
 			extensions.get( 'WEBGL_depth_texture' );
 			extensions.get( 'WEBGL_depth_texture' );
 			extensions.get( 'OES_texture_float' );
 			extensions.get( 'OES_texture_float' );
@@ -23544,6 +23548,7 @@ function WebGLRenderer( parameters ) {
 		}
 		}
 
 
 		extensions.get( 'OES_texture_float_linear' );
 		extensions.get( 'OES_texture_float_linear' );
+		extensions.get( 'EXT_color_buffer_half_float' );
 
 
 		utils = new WebGLUtils( _gl, extensions, capabilities );
 		utils = new WebGLUtils( _gl, extensions, capabilities );
 
 
@@ -25143,9 +25148,11 @@ function WebGLRenderer( parameters ) {
 
 
 				}
 				}
 
 
+				const halfFloatSupportedByExt = textureType === HalfFloatType && ( extensions.get( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.get( 'EXT_color_buffer_float' ) ) );
+
 				if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( 35738 ) && // IE11, Edge and Chrome Mac < 52 (#9513)
 				if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( 35738 ) && // IE11, Edge and Chrome Mac < 52 (#9513)
 					! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.get( 'OES_texture_float' ) || extensions.get( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox
 					! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.get( 'OES_texture_float' ) || extensions.get( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox
-					! ( textureType === HalfFloatType && ( capabilities.isWebGL2 ? extensions.get( 'EXT_color_buffer_float' ) : extensions.get( 'EXT_color_buffer_half_float' ) ) ) ) {
+					! halfFloatSupportedByExt ) {
 
 
 					console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );
 					console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );
 					return;
 					return;

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff