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 RefUnwindSafe for DepthBias
impl Send for DepthBias
impl Sync for DepthBias
impl Unpin for DepthBias
impl UnwindSafe for DepthBias
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more