File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { CSMShader } from './CSMShader.js';
1313const _cameraToLightMatrix = new Matrix4 ( ) ;
1414const _lightSpaceFrustum = new CSMFrustum ( { webGL : true } ) ;
1515const _center = new Vector3 ( ) ;
16+ const _origin = new Vector3 ( ) ;
1617const _bbox = new Box3 ( ) ;
1718const _uniformArray = [ ] ;
1819const _logArray = [ ] ;
@@ -367,7 +368,7 @@ export class CSM {
367368
368369 // for each frustum we need to find its min-max box aligned with the light orientation
369370 // the position in _lightOrientationMatrix does not matter, as we transform there and back
370- _lightOrientationMatrix . lookAt ( new Vector3 ( ) , this . lightDirection , _up ) ;
371+ _lightOrientationMatrix . lookAt ( _origin , this . lightDirection , _up ) ;
371372 _lightOrientationMatrixInverse . copy ( _lightOrientationMatrix ) . invert ( ) ;
372373
373374 for ( let i = 0 ; i < frustums . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments