Skip to main content

ProbeUpdate

Enum ProbeUpdate 

Source
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.

Trait Implementations§

Source§

impl Clone for ProbeUpdate

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ProbeUpdate

Source§

impl Debug for ProbeUpdate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProbeUpdate

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for ProbeUpdate

Source§

impl PartialEq for ProbeUpdate

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ProbeUpdate

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HalThreadSafe for T
where T: Send + Sync,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.