From 21ae3131839e11323b4449c7374e876628b88a38 Mon Sep 17 00:00:00 2001 From: Shota Matsuda Date: Wed, 18 Mar 2026 17:30:06 +0900 Subject: [PATCH 1/2] CSMShadowNode: Fix error when disposed multiple times (#33202) --- examples/jsm/csm/CSMShadowNode.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/jsm/csm/CSMShadowNode.js b/examples/jsm/csm/CSMShadowNode.js index 57c42e0c0b64b8..4e2ae5b55c228d 100644 --- a/examples/jsm/csm/CSMShadowNode.js +++ b/examples/jsm/csm/CSMShadowNode.js @@ -574,8 +574,12 @@ class CSMShadowNode extends ShadowBaseNode { const light = this.lights[ i ]; const parent = light.parent; - parent.remove( light.target ); - parent.remove( light ); + if ( parent !== null ) { + + parent.remove( light.target ); + parent.remove( light ); + + } } From bfe332d9ee7016ab36dfb79826d421d4487058f4 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Wed, 18 Mar 2026 11:48:43 +0100 Subject: [PATCH 2/2] PassNode: Fix scissor and viewport setup. (#33204) --- src/nodes/display/PassNode.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/nodes/display/PassNode.js b/src/nodes/display/PassNode.js index f6add436d0386a..a75f1fd4f9f0cb 100644 --- a/src/nodes/display/PassNode.js +++ b/src/nodes/display/PassNode.js @@ -886,8 +886,26 @@ class PassNode extends TempNode { this.renderTarget.setSize( effectiveWidth, effectiveHeight ); - if ( this._scissor !== null ) this.renderTarget.scissor.copy( this._scissor ); - if ( this._viewport !== null ) this.renderTarget.viewport.copy( this._viewport ); + // scissor + + if ( this._scissor !== null ) { + + this.renderTarget.scissor.copy( this._scissor ).multiplyScalar( this._pixelRatio * this._resolutionScale ).floor(); + this.renderTarget.scissorTest = true; + + } else { + + this.renderTarget.scissorTest = false; + + } + + // viewport + + if ( this._viewport !== null ) { + + this.renderTarget.viewport.copy( this._viewport ).multiplyScalar( this._pixelRatio * this._resolutionScale ).floor(); + + } } @@ -922,8 +940,6 @@ class PassNode extends TempNode { } - this._scissor.multiplyScalar( this._pixelRatio * this._resolutionScale ).floor(); - } } @@ -958,8 +974,6 @@ class PassNode extends TempNode { } - this._viewport.multiplyScalar( this._pixelRatio * this._resolutionScale ).floor(); - } }