Renderer · const
MAX_CLUSTERED_LIGHTS
How many lights the clustered path carries at once.
Explained in Hello world.
const MAX_CLUSTERED_LIGHTS = 320import { MAX_CLUSTERED_LIGHTS } from '@driftengine/core';In depth
This is the number that replaces MAX_POINT_LIGHTS, and it is not bounded by the same
thing: the sixteen is a uniform-array size and an iteration of the widest shader's light loop,
while this is a row count in a texture nobody iterates in full. 320 lights is three rows.
320 rather than 256 because the light region has to end on a row boundary — see TABLE_WIDTH —
and at three texels a light, 320 is the smallest count at or above 256 that does.