pub enum ProbeUpdate {
Authored,
EveryFrame,
}Expand description
Who writes an irradiance volume’s rows: the description that authored them, or the irradiance probes’ every-frame updater.
§Why this is a field of the volume and not an effect bit or a console
variable
Not a RenderEffects bit: those are a
frame-wide toggle with a settings key each — every_effect_has_a_key_and_no_two_share_one
is what holds that pairing — and a new key shifts the options demo’s fader
indices in web/tools/browser-e2e.mjs. What decides whether a volume is
updated is a property of that volume, not of the frame.
Not a console variable: a convar is process-global, and the pass-list tests run every scene of a fixture in one process. A scene’s answer would then depend on what ran before it.
So it is a field, and Authored is Default: a scene
that says nothing records neither of the updater’s two passes and pays
nothing for them.
Variants§
Authored
The rows are the ones ProbeGrid::probes carries, uploaded once and
never written again.
Every scene that existed before the updater, and every scene whose
lighting a golden pins: crates/crcbl/tests/golden/probes.png is the
anti-vacuity floor for the whole probe read path and stands on rows a
Rust mirror can predict.
EveryFrame
The rows are overwritten every frame by the reflective-shadow-map
gather — crcbl_render::rsm draws the map and
crcbl_render::probe_gather reads it into the table.
ProbeGrid::probes is then the volume’s size rather than its
contents: the rows still have to be there, because the table is sized
from them and check holds the two to each other, but what a frame reads
is what the gather wrote.
It needs the sun’s near cascade. The map is the cascade’s own draws
through the cascade’s own matrix, so a frame drawing without
RenderEffects::SHADOWS — or
one whose shadow cadence held cascade 0 — records neither pass and leaves
the rows as the last gather wrote them. The renderer keeps cascade 0 off
the static-cache hold for exactly this reason, so the ordinary frame does
run it; a caller that has raised r_shadow_cadence past one has asked
for the cascade to be redrawn less often and gets a bounce that follows
it.
Probes outside the near cascade gather nothing. The map covers
cascade 0’s camera-following sphere, so a volume larger than that sphere
has rows the updater never reaches.
ForwardRenderer::follow_probe_volume
is what closes that for a volume small enough to follow the camera: it
re-centres each level on a tracked point by whole probe steps and moves
the position table the gather reads with it. A volume authored to cover
its whole scene has nowhere to step to and keeps the rows the cascade
cannot reach.