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