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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more