pub struct ComputedLighting {
pub ambient_color: [f32; 3],
pub directional_dir: [f32; 3],
pub directional_color: [f32; 3],
pub lighting_enabled: f32,
pub shadows_enabled: bool,
}Expand description
Pre-computed lighting parameters ready for GPU uniform upload.
Computed once per frame from the LightConfig stored on
[MapState]. Both WGPU and Bevy renderers consume this struct
directly.
Fields§
§ambient_color: [f32; 3]Ambient light colour scaled by intensity (linear RGB).
directional_dir: [f32; 3]Unit direction vector toward the light source in world space.
directional_color: [f32; 3]Directional light colour scaled by intensity (linear RGB).
lighting_enabled: f321.0 when using default (ambient+directional) mode, 0.0 for flat.
shadows_enabled: boolWhether shadow mapping is enabled for this frame.
Trait Implementations§
Source§impl Clone for ComputedLighting
impl Clone for ComputedLighting
Source§fn clone(&self) -> ComputedLighting
fn clone(&self) -> ComputedLighting
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 ComputedLighting
impl Debug for ComputedLighting
Source§impl Default for ComputedLighting
impl Default for ComputedLighting
Source§impl PartialEq for ComputedLighting
impl PartialEq for ComputedLighting
impl Copy for ComputedLighting
impl StructuralPartialEq for ComputedLighting
Auto Trait Implementations§
impl Freeze for ComputedLighting
impl RefUnwindSafe for ComputedLighting
impl Send for ComputedLighting
impl Sync for ComputedLighting
impl Unpin for ComputedLighting
impl UnsafeUnpin for ComputedLighting
impl UnwindSafe for ComputedLighting
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