Skip to main content

Module shadows_lane

Module shadows_lane 

Source
Expand description

Shadow lanes for [ShadowAgent].

Per the SAA lane model, each lane in this module is a distinct quality strategy, all implementing the same shadow domain:

All produce identical output types (ShadowGpuBindings + ShadowEntries); lit consumer lanes never need to know which one ran. The agent picks one per frame via apply_budget.

Shared infrastructure (atlas creation, pass recording, draw-cmd building) lives in algo as free functions that take dimensions as parameters — never as a config struct injected by the agent.

Modules§

algo
Shadow rendering algorithm — free functions shared by every quality tier (StandardShadowsLane, LowResShadowsLane, future variants).

Structs§

LowResShadowsLane
Low-resolution shadows: 512² × 4-layer 2D atlas + 128² × 4-cube cube atlas. Same algorithm and output types as super::StandardShadowsLane; just lower-resolution textures — VRAM ≈ 1.5 + 0.25 MiB instead of 64 + 24 MiB.
MediumShadowsLane
Medium-resolution shadows: 1024² × 4-layer 2D atlas + 256² × 4-cube cube atlas. Same algorithm and output types as super::StandardShadowsLane; half the per-side resolution — VRAM ≈ 16 + 6 MiB instead of 64 + 24 MiB.
StandardShadowsLane
Full-quality shadows: 2048² × 4-layer 2D atlas + 512² × 4-cube cube atlas. Drives the canonical CSM / spot perspective / 6-pass point pipeline; publishes a [khora_data::render::ShadowGpuBindings] bundle plus per-light entries into the per-frame lane context.

Constants§

LOW_RES_STRATEGY_NAME
Stable strategy name advertised to the agent / GORNA.
MEDIUM_STRATEGY_NAME
Stable strategy name advertised to the agent / GORNA.
STANDARD_STRATEGY_NAME
Stable strategy name advertised to the agent / GORNA.