pub enum FogFalloff {
Exponential {
density: f32,
},
Linear {
start: f32,
end: f32,
},
ExponentialHeightSlab {
density: f32,
bottom: f32,
top: f32,
},
}Expand description
How much of a surface’s light the fog replaces, by its distance d from the camera in metres.
Variants§
Exponential
1 - exp(-density * d); density per metre.
Linear
0 up to start, 1 from end, linear between; metres, start < end.
ExponentialHeightSlab
Uniform density inside a horizontal slab, zero outside it. bottom and top are absolute world Y heights
in metres (bottom < top), in core’s Y-up frame. Replace by 1 - exp(-density * inside) where inside is
the length in metres of the camera-to-surface segment inside that slab; density is per metre. This is
extinction and a constant fog colour, not a height-dependent density gradient or anisotropic scattering.
Trait Implementations§
Source§impl Clone for FogFalloff
impl Clone for FogFalloff
Source§impl Debug for FogFalloff
impl Debug for FogFalloff
Source§impl PartialEq for FogFalloff
impl PartialEq for FogFalloff
Source§impl Serialize for FogFalloff
impl Serialize for FogFalloff
impl StructuralPartialEq for FogFalloff
Auto Trait Implementations§
impl Forget for FogFalloff
impl Freeze for FogFalloff
impl RefUnwindSafe for FogFalloff
impl Send for FogFalloff
impl Sync for FogFalloff
impl Unpin for FogFalloff
impl UnsafeUnpin for FogFalloff
impl UnwindSafe for FogFalloff
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