#[repr(C)]pub enum CompareFunction {
Never = 1,
Less = 2,
Equal = 3,
LessEqual = 4,
Greater = 5,
NotEqual = 6,
GreaterEqual = 7,
Always = 8,
}
Expand description
Comparison function used for depth and stencil operations.
Corresponds to WebGPU GPUCompareFunction
.
Variants§
Never = 1
Function never passes
Less = 2
Function passes if new value less than existing value
Equal = 3
Function passes if new value is equal to existing value. When using
this compare function, make sure to mark your Vertex Shader’s @builtin(position)
output as @invariant
to prevent artifacting.
LessEqual = 4
Function passes if new value is less than or equal to existing value
Greater = 5
Function passes if new value is greater than existing value
NotEqual = 6
Function passes if new value is not equal to existing value. When using
this compare function, make sure to mark your Vertex Shader’s @builtin(position)
output as @invariant
to prevent artifacting.
GreaterEqual = 7
Function passes if new value is greater than or equal to existing value
Always = 8
Function always passes
Implementations§
Source§impl CompareFunction
impl CompareFunction
Sourcepub fn needs_ref_value(self) -> bool
pub fn needs_ref_value(self) -> bool
Returns true if the comparison depends on the reference value.
Trait Implementations§
Source§impl Clone for CompareFunction
impl Clone for CompareFunction
Source§fn clone(&self) -> CompareFunction
fn clone(&self) -> CompareFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CompareFunction
impl Debug for CompareFunction
Source§impl Hash for CompareFunction
impl Hash for CompareFunction
Source§impl PartialEq for CompareFunction
impl PartialEq for CompareFunction
impl Copy for CompareFunction
impl Eq for CompareFunction
impl StructuralPartialEq for CompareFunction
Auto Trait Implementations§
impl Freeze for CompareFunction
impl RefUnwindSafe for CompareFunction
impl Send for CompareFunction
impl Sync for CompareFunction
impl Unpin for CompareFunction
impl UnwindSafe for CompareFunction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)