pub struct Fog3d { /* private fields */ }Expand description
Exponential RGB fog using camera-forward world distance, never a culling rule.
Participating surfaces use 1 - exp(-density * max(view_depth - start, 0)).
Depth is distance along camera forward, not radial distance or projection Z;
perspective and orthographic cameras share this contract. Alpha, depth writes,
mathematical edges and scene clear color are unchanged. Every surface opts in
with SurfaceStyle3d::with_fog(true), independently of illumination mode.
Implementations§
Source§impl Fog3d
impl Fog3d
Sourcepub fn new(
color: Color,
start_world_distance: f32,
density: f32,
) -> Result<Self, Fog3dError>
pub fn new( color: Color, start_world_distance: f32, density: f32, ) -> Result<Self, Fog3dError>
Accepts normalized opaque fog RGB, start in world-distance units and density in inverse world-distance units. Scalars must be zero or normal positive finite values; zero density disables fog without evaluating its arithmetic.
Trait Implementations§
impl Copy for Fog3d
impl StructuralPartialEq for Fog3d
Auto Trait Implementations§
impl Freeze for Fog3d
impl RefUnwindSafe for Fog3d
impl Send for Fog3d
impl Sync for Fog3d
impl Unpin for Fog3d
impl UnsafeUnpin for Fog3d
impl UnwindSafe for Fog3d
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