Skip to content

Commit de5d8ae

Browse files
sunagRuthySheffi
authored andcommitted
TSL: Fix lightShadowMatrix() if renderer.shadowMap.enabled is false (mrdoob#31024)
1 parent f981e90 commit de5d8ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nodes/accessors/Lights.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export function lightShadowMatrix( light ) {
3030

3131
const data = getLightData( light );
3232

33-
return data.shadowMatrix || ( data.shadowMatrix = uniform( 'mat4' ).setGroup( renderGroup ).onRenderUpdate( () => {
33+
return data.shadowMatrix || ( data.shadowMatrix = uniform( 'mat4' ).setGroup( renderGroup ).onRenderUpdate( ( frame ) => {
3434

35-
if ( light.castShadow !== true ) {
35+
if ( light.castShadow !== true || frame.renderer.shadowMap.enabled === false ) {
3636

3737
light.shadow.updateMatrices( light );
3838

0 commit comments

Comments
 (0)