|
@@ -949,6 +949,7 @@ class WebGLRenderer {
|
|
}
|
|
}
|
|
|
|
|
|
currentRenderState.setupLights( _this._useLegacyLights );
|
|
currentRenderState.setupLights( _this._useLegacyLights );
|
|
|
|
+ currentRenderState.setupLightsView( camera );
|
|
|
|
|
|
// Only initialize materials in the new scene, not the targetScene.
|
|
// Only initialize materials in the new scene, not the targetScene.
|
|
|
|
|
|
@@ -1242,6 +1243,24 @@ class WebGLRenderer {
|
|
|
|
|
|
currentRenderState = renderStateStack[ renderStateStack.length - 1 ];
|
|
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 {
|
|
} else {
|
|
|
|
|
|
currentRenderState = null;
|
|
currentRenderState = null;
|