function lightShadowMatrix( light ) {

	const data = getLightData( light );

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

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

			light.shadow.updateMatrices( light );

		}

		return light.shadow.matrix;

	} ) );

}
TSL function for getting a shadow matrix uniform node for the given light.

@tsl
@function
@param {Light} light -The light source.
@returns {UniformNode<mat4>} The shadow matrix uniform node.