#[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 more