File: TileShadowNode.md | Updated: 11/15/2025
A class that extends ShadowBaseNode to implement tiled shadow mapping. This allows splitting a shadow map into multiple tiles, each with its own light and camera, to improve shadow quality and performance for large scenes.
Note: This class does not support VSMShadowMap at the moment.
TileShadowNode is an addon, and must be imported explicitly, see Installation#Addons.
import { TileShadowNode } from 'three/addons/tsl/shadows/TileShadowNode.js';
Creates an instance of TileShadowNode.
light | The original light source used for shadow mapping.
---|---
options | Configuration options for the tiled shadow node. Default is {}. | tilesX | The number of tiles along the X-axis. Default is 2.
---|---
tilesY | The number of tiles along the Y-axis. Default is 2.
resolution | The resolution of the shadow map.
debug | Whether to enable debug mode. Default is false.
Helper method to remove lights and associated nodes/targets. Used internally during dispose and potential re-initialization.
Generates the tiles for the shadow map based on the specified number of tiles along the X and Y axes.
tilesX | The number of tiles along the X-axis.
---|---
tilesY | The number of tiles along the Y-axis.
Returns: An array of tile objects, each containing the tile's bounds and index.
Initializes the tiled shadow node by creating lights, cameras, and shadow maps for each tile.
builder | The builder used to create render targets and other resources.
---|---
Sets up the shadow node for rendering.
builder | The builder used to set up the shadow node.
---|---
Overrides: ShadowBaseNode#setup
Returns: A node representing the shadow value.
Synchronizes the transformation of a tile light with the source light.
lwLight | The tile light to synchronize.
---|---
sourceLight | The source light to copy transformations from.
Updates the light transformations and shadow cameras for each tile.
Overrides: ShadowBaseNode#update
The implementation performs the update of the shadow map if necessary.
frame | A reference to the current node frame.
---|---
Overrides: ShadowBaseNode#updateBefore
Updates the initial light direction based on the light's target position.
Updates the shadow map rendering.
frame | A reference to the current node frame.
---|---