pub struct ComputedShadow {
pub enabled: bool,
pub light_matrices: [[[f32; 4]; 4]; 4],
pub cascade_count: u32,
pub map_resolution: u32,
pub intensity: f32,
pub texel_size: f32,
pub normal_offset: f32,
pub cascade_split: f32,
}Expand description
Pre-computed shadow parameters for the current frame.
Computed by the engine each frame when shadows are enabled, then consumed by the WGPU renderer to build depth passes and upload uniforms.
Fields§
§enabled: boolWhether shadows are enabled this frame.
light_matrices: [[[f32; 4]; 4]; 4]Light-space view-projection matrices, one per cascade.
Each transforms world-space positions into [-1, 1] NDC for
the corresponding cascade depth texture.
cascade_count: u32Number of active cascades (1–4).
map_resolution: u32Shadow map resolution per cascade.
intensity: f32Shadow intensity [0, 1].
texel_size: f32Texel size = 1.0 / map_resolution.
normal_offset: f32Normal offset scale in world units.
cascade_split: f32Far distance of cascade 0 (used for cascade selection in shaders).
Trait Implementations§
Source§impl Clone for ComputedShadow
impl Clone for ComputedShadow
Source§fn clone(&self) -> ComputedShadow
fn clone(&self) -> ComputedShadow
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputedShadow
impl Debug for ComputedShadow
Source§impl Default for ComputedShadow
impl Default for ComputedShadow
Source§impl PartialEq for ComputedShadow
impl PartialEq for ComputedShadow
impl Copy for ComputedShadow
impl StructuralPartialEq for ComputedShadow
Auto Trait Implementations§
impl Freeze for ComputedShadow
impl RefUnwindSafe for ComputedShadow
impl Send for ComputedShadow
impl Sync for ComputedShadow
impl Unpin for ComputedShadow
impl UnsafeUnpin for ComputedShadow
impl UnwindSafe for ComputedShadow
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