Enum wgpu_types::CompareFunction
source · #[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
source§fn eq(&self, other: &CompareFunction) -> bool
fn eq(&self, other: &CompareFunction) -> bool
self
and other
values to be equal, and is used
by ==
.