Struct ShadowFrame
pub struct ShadowFrame {
pub bindings: Option<ShadowGpuBindings>,
pub entries: ShadowEntries,
}Expand description
Per-frame shadow output published by the shadow lane into the deck.
Holds:
- The opaque
ShadowGpuBindingsbundle lit consumer lanes use to build their group-3 bind group. - The per-light
ShadowEntriesmap lit consumer lanes look up to embed shadow matrices / atlas indices in their per-light uniforms.
bindings may be None for a frame where the strategy had nothing
to bind (e.g. atlases still initialising); consumers fall back to no
shadows in that case. The entries field is always present (it may
be empty).
Fields§
§bindings: Option<ShadowGpuBindings>GPU resources to bind for the lighting bind group (slot 1/2/3).
entries: ShadowEntriesPer-light shadow data, keyed by light index.
Implementations§
§impl ShadowFrame
impl ShadowFrame
pub fn bindings(&self) -> Option<&ShadowGpuBindings>
pub fn bindings(&self) -> Option<&ShadowGpuBindings>
Returns the bindings if present, falling back to None so the
caller can early-return.
pub fn entry(&self, light_index: usize) -> Option<&ShadowEntry>
pub fn entry(&self, light_index: usize) -> Option<&ShadowEntry>
Convenience accessor for an entry by light index.
Trait Implementations§
§impl Clone for ShadowFrame
impl Clone for ShadowFrame
§fn clone(&self) -> ShadowFrame
fn clone(&self) -> ShadowFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ShadowFrame
impl Debug for ShadowFrame
§impl Default for ShadowFrame
impl Default for ShadowFrame
§fn default() -> ShadowFrame
fn default() -> ShadowFrame
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShadowFrame
impl RefUnwindSafe for ShadowFrame
impl Send for ShadowFrame
impl Sync for ShadowFrame
impl Unpin for ShadowFrame
impl UnsafeUnpin for ShadowFrame
impl UnwindSafe for ShadowFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more