Przeglądaj źródła

Updated builds.

Mr.doob 8 lat temu
rodzic
commit
e3a059a31c
3 zmienionych plików z 250 dodań i 236 usunięć
  1. 12 5
      build/three.js
  2. 226 226
      build/three.min.js
  3. 12 5
      build/three.module.js

+ 12 - 5
build/three.js

@@ -20249,7 +20249,9 @@
 			_currentFramebuffer = null,
 			_currentMaterialId = - 1,
 			_currentGeometryProgram = '',
+
 			_currentCamera = null,
+			_currentArrayCamera = null,
 
 			_currentScissor = new Vector4(),
 			_currentScissorTest = null,
@@ -21601,6 +21603,8 @@
 
 				if ( camera.isArrayCamera ) {
 
+					_currentArrayCamera = camera;
+
 					var cameras = camera.cameras;
 
 					for ( var j = 0, jl = cameras.length; j < jl; j ++ ) {
@@ -21623,6 +21627,8 @@
 
 				} else {
 
+					_currentArrayCamera = null;
+
 					renderObject( object, scene, camera, geometry, material, group );
 
 				}
@@ -21900,10 +21906,11 @@
 
 				}
 
+				// Avoid unneeded uniform updates per ArrayCamera's sub-camera
 
-				if ( camera !== _currentCamera ) {
+				if ( _currentCamera !== ( _currentArrayCamera || camera ) ) {
 
-					_currentCamera = camera;
+					_currentCamera = ( _currentArrayCamera || camera );
 
 					// lighting uniforms depend on the camera so enforce an update
 					// now, in case this material supports lights - or later, when
@@ -21944,9 +21951,6 @@
 
 				}
 
-				p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );
-				p_uniforms.setValue( _gl, 'toneMappingWhitePoint', _this.toneMappingWhitePoint );
-
 			}
 
 			// skinning uniforms must be set even if material didn't change
@@ -22006,6 +22010,9 @@
 
 			if ( refreshMaterial ) {
 
+				p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );
+				p_uniforms.setValue( _gl, 'toneMappingWhitePoint', _this.toneMappingWhitePoint );
+
 				if ( material.lights ) {
 
 					// the current material requires lighting info

Plik diff jest za duży
+ 226 - 226
build/three.min.js


+ 12 - 5
build/three.module.js

@@ -20243,7 +20243,9 @@ function WebGLRenderer( parameters ) {
 		_currentFramebuffer = null,
 		_currentMaterialId = - 1,
 		_currentGeometryProgram = '',
+
 		_currentCamera = null,
+		_currentArrayCamera = null,
 
 		_currentScissor = new Vector4(),
 		_currentScissorTest = null,
@@ -21595,6 +21597,8 @@ function WebGLRenderer( parameters ) {
 
 			if ( camera.isArrayCamera ) {
 
+				_currentArrayCamera = camera;
+
 				var cameras = camera.cameras;
 
 				for ( var j = 0, jl = cameras.length; j < jl; j ++ ) {
@@ -21617,6 +21621,8 @@ function WebGLRenderer( parameters ) {
 
 			} else {
 
+				_currentArrayCamera = null;
+
 				renderObject( object, scene, camera, geometry, material, group );
 
 			}
@@ -21894,10 +21900,11 @@ function WebGLRenderer( parameters ) {
 
 			}
 
+			// Avoid unneeded uniform updates per ArrayCamera's sub-camera
 
-			if ( camera !== _currentCamera ) {
+			if ( _currentCamera !== ( _currentArrayCamera || camera ) ) {
 
-				_currentCamera = camera;
+				_currentCamera = ( _currentArrayCamera || camera );
 
 				// lighting uniforms depend on the camera so enforce an update
 				// now, in case this material supports lights - or later, when
@@ -21938,9 +21945,6 @@ function WebGLRenderer( parameters ) {
 
 			}
 
-			p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );
-			p_uniforms.setValue( _gl, 'toneMappingWhitePoint', _this.toneMappingWhitePoint );
-
 		}
 
 		// skinning uniforms must be set even if material didn't change
@@ -22000,6 +22004,9 @@ function WebGLRenderer( parameters ) {
 
 		if ( refreshMaterial ) {
 
+			p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );
+			p_uniforms.setValue( _gl, 'toneMappingWhitePoint', _this.toneMappingWhitePoint );
+
 			if ( material.lights ) {
 
 				// the current material requires lighting info

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików