Skip to main content

CLUSTER_SCENE

Static CLUSTER_SCENE 

Source
pub static CLUSTER_SCENE: SceneDef
Expand description

The frame’s cluster grid, composited over the lighting.

The grid is what a fragment uses to find its lights, and it is built on the CPU from the camera and the target’s size, so nothing about it is visible: a cell given the wrong lights, a grid built for another aspect, or a depth slice that does not match the fragment’s own lookup all show up as a change of brightness and nothing else. This scene draws the grid itself, so a wrong assignment is a shape in the wrong place rather than a subtle change of level. It is a scene of its own rather than an overlay on the lit scene: the lit scene’s lights all reach nearly every cell, which leaves the count map flat, and what a debug view has to show is where the counts differ.