pub struct ComputedFog {
pub fog_color: [f32; 4],
pub fog_start: f32,
pub fog_end: f32,
pub fog_density: f32,
pub clear_color: [f32; 4],
}Expand description
Pre-computed fog parameters ready for GPU uniform upload.
Computed by the engine each frame from camera state, the optional
FogConfig, and the background colour. Both WGPU and Bevy
renderers consume this struct directly instead of duplicating the
fog math.
Fields§
§fog_color: [f32; 4]Fog / horizon tint colour (RGBA, linear).
fog_start: f32Distance from the camera eye at which fog begins (meters).
fog_end: f32Distance from the camera eye at which fog reaches full density (meters).
fog_density: f32Peak fog density [0.0, 1.0].
clear_color: [f32; 4]Background clear colour after atmospheric tinting.
Trait Implementations§
Source§impl Clone for ComputedFog
impl Clone for ComputedFog
Source§fn clone(&self) -> ComputedFog
fn clone(&self) -> ComputedFog
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 ComputedFog
impl Debug for ComputedFog
Source§impl Default for ComputedFog
impl Default for ComputedFog
Source§impl PartialEq for ComputedFog
impl PartialEq for ComputedFog
impl Copy for ComputedFog
impl StructuralPartialEq for ComputedFog
Auto Trait Implementations§
impl Freeze for ComputedFog
impl RefUnwindSafe for ComputedFog
impl Send for ComputedFog
impl Sync for ComputedFog
impl Unpin for ComputedFog
impl UnsafeUnpin for ComputedFog
impl UnwindSafe for ComputedFog
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