Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit8d45df8664

README.md

shadowPages render feature

Draws the shadowPages capture view: which level of the sun's virtual shadow map each pixel samples.

A geometry pass over @geometry.opaque replaces every surface's own material with the page shader, which asks zshadow_directional_level and zshadow_page_lookup (the functions the lit path calls) for the level and the page a fragment reads, and colours it by level. Because the colour comes from the lookup itself, a page that changes on screen is a page that changed in the renderer.

A hue per level. A darker hue means the page asked for is not rendered and the fragment reads a coarser level. Yellow stripes mark a dirty page: something that casts into it changed, and it is drawn again on the next run. Cyan means no page at any level holds the pixel. Grey is past the last level, where nothing shadows. Magenta everywhere means the sun casts nothing this frame.

Brightness carries the surface normal so the scene stays readable.

The pass carries the view's debug channel, so it does not draw for a camera that is not a capture of pass = "shadowPages". It tests lessEqual against the depth the opaque pass already wrote and writes none of its own. The feature is created on demand by @builtin::systems.renderDiagnostics.renderDiagnostics.