|
@@ -1366,6 +1366,8 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ currentRenderState.setupLights( camera2 );
|
|
|
+
|
|
|
renderObject( object, scene, camera2, geometry, material, group );
|
|
|
|
|
|
}
|
|
@@ -1691,7 +1693,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( refreshProgram || camera !== _currentCamera ) {
|
|
|
+ if ( refreshProgram || _currentCamera !== camera ) {
|
|
|
|
|
|
p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );
|
|
|
|
|
@@ -1702,11 +1704,9 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- // Avoid unneeded uniform updates per ArrayCamera's sub-camera
|
|
|
-
|
|
|
- if ( _currentCamera !== ( _currentArrayCamera || camera ) ) {
|
|
|
+ if ( _currentCamera !== camera ) {
|
|
|
|
|
|
- _currentCamera = ( _currentArrayCamera || camera );
|
|
|
+ _currentCamera = camera;
|
|
|
|
|
|
// lighting uniforms depend on the camera so enforce an update
|
|
|
// now, in case this material supports lights - or later, when
|