|
@@ -21826,6 +21826,8 @@ function WebGLRenderState( extensions ) {
|
|
|
|
|
|
function setupLightsView( camera ) {
|
|
|
|
|
|
+ state.camera = camera;
|
|
|
+
|
|
|
lights.setupView( lightsArray, camera );
|
|
|
|
|
|
}
|
|
@@ -21835,6 +21837,7 @@ function WebGLRenderState( extensions ) {
|
|
|
shadowsArray: shadowsArray,
|
|
|
|
|
|
lights: lights,
|
|
|
+ camera: null,
|
|
|
|
|
|
transmissionRenderTarget: {}
|
|
|
};
|
|
@@ -29066,6 +29069,7 @@ class WebGLRenderer {
|
|
|
}
|
|
|
|
|
|
currentRenderState.setupLights( _this._useLegacyLights );
|
|
|
+ currentRenderState.setupLightsView( camera );
|
|
|
|
|
|
// Only initialize materials in the new scene, not the targetScene.
|
|
|
|
|
@@ -29359,6 +29363,24 @@ class WebGLRenderer {
|
|
|
|
|
|
currentRenderState = renderStateStack[ renderStateStack.length - 1 ];
|
|
|
|
|
|
+ // restore clipping uniforms and viewport
|
|
|
+
|
|
|
+ const renderStateCamera = currentRenderState.state.camera;
|
|
|
+
|
|
|
+ if ( renderStateCamera !== null ) {
|
|
|
+
|
|
|
+ if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, renderStateCamera );
|
|
|
+
|
|
|
+ const viewport = renderStateCamera.viewport;
|
|
|
+
|
|
|
+ if ( viewport !== undefined ) {
|
|
|
+
|
|
|
+ state.viewport( viewport );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
currentRenderState = null;
|