Enum wgpu::CompareFunction
#[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§
§impl CompareFunction
impl CompareFunction
pub 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§
§impl Clone for CompareFunction
impl Clone for CompareFunction
§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§impl Debug for CompareFunction
impl Debug for CompareFunction
§impl<'de> Deserialize<'de> for CompareFunction
impl<'de> Deserialize<'de> for CompareFunction
§fn deserialize<__D>(
__deserializer: __D
) -> Result<CompareFunction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CompareFunction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Hash for CompareFunction
impl Hash for CompareFunction
§impl PartialEq for CompareFunction
impl PartialEq for CompareFunction
§fn eq(&self, other: &CompareFunction) -> bool
fn eq(&self, other: &CompareFunction) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for CompareFunction
impl Serialize for CompareFunction
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for CompareFunction
impl Eq for CompareFunction
impl StructuralEq for CompareFunction
impl StructuralPartialEq for CompareFunction
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.