API

Interface ClusteredLightContainer

Holds a large set of point and spot lights that are binned into screen-space clusters on the GPU, so PBR materials can shade hundreds of lights efficiently. Add it to a scene with addClusteredLightContainer.

interface ClusteredLightContainer {
    horizontalTiles: number;
    kind: "clusteredLightContainer";
    pointLights: ClusteredPointLight[];
    spotLights: ClusteredSpotLight[];
    verticalTiles: number;
    zSlices: number;
}
Index
horizontalTiles: number

Number of cluster tiles across the screen horizontally.

kind: "clusteredLightContainer"

Discriminant tag identifying this object as a clustered light container.

pointLights: ClusteredPointLight[]

The point lights managed by this container.

spotLights: ClusteredSpotLight[]

The spot lights managed by this container. Add them with createClusteredSpotLight.

verticalTiles: number

Number of cluster tiles across the screen vertically.

zSlices: number

Number of depth slices used to bin lights along view-space Z.