pub struct DepthBias {
pub const_factor: f32,
pub clamp: f32,
pub slope_factor: f32,
}
Expand description
A depth bias allows changing the produced depth values for fragments slightly but consistently. This permits drawing of multiple polygons in the same plane without Z-fighting, such as when trying to draw shadows on a wall.
For details of the algorithm and equations, see the Vulkan spec.
Fields§
§const_factor: f32
A constant depth value added to each fragment.
clamp: f32
The minimum or maximum depth bias of a fragment.
slope_factor: f32
A constant bias applied to the fragment’s slope.
Trait Implementations§
impl Copy for DepthBias
impl StructuralPartialEq for DepthBias
Auto Trait Implementations§
impl Freeze for DepthBias
impl RefUnwindSafe for DepthBias
impl Send for DepthBias
impl Sync for DepthBias
impl Unpin for DepthBias
impl UnwindSafe for DepthBias
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