Expand description
The cluster debug scene: the grid a lit frame looks its lights up in.
Nothing of the lit scene is reused. What this scene has to show is where the light counts differ from cell to cell, and the lit sceneโs lights reach nearly every cell, which leaves that map flat: here one row of each light kind crosses a long floor, so each kindโs footprint is a band of its own and a light written into the wrong cells moves a patch rather than shifting a level everywhere.
Re-exportsยง
use super::LitSurface;๐use super::PlacedLight;๐use super::SceneControl;๐use super::SceneDef;๐use super::SceneOptions;๐use super::allocate_surface;๐use super::camera_looking_at;๐use super::grid;๐use unlit_ecs::bundle;๐use unlit_wgpu::pipeline::LitShader;๐use unlit3d::prelude::*;๐
Constantsยง
- CLUSTER_
COLUMNS ๐ - The columns the debug floorโs lights stand in.
- CLUSTER_
EYE ๐ - Where the debug camera sits and what it looks at.
- CLUSTER_
FAR ๐ - CLUSTER_
FLOOR ๐ - The debug floor: how wide and how deep, and where its front edge sits.
- CLUSTER_
NEAR ๐ - The depth range the debug sceneโs grid spans.
- CLUSTER_
ROWS ๐ - Where each row of lights sits, nearest first: its depth, the height its lights hover at, and how far each one reaches.
- CLUSTER_
TARGET ๐
Staticsยง
- CLUSTER_
SCENE - The frameโs cluster grid, composited over the lighting.
Functionsยง
- build_
clusters ๐ - Build the cluster debug sceneโs world content.
- cluster_
grid ๐ - The WESL the debug sceneโs fragment stage runs, spliced at the built-in stageโs fragment hook.