#[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 From<CompareFunction> for ImageCompareFunction
impl From<CompareFunction> for ImageCompareFunction
source§fn from(value: CompareFunction) -> ImageCompareFunction
fn from(value: CompareFunction) -> ImageCompareFunction
source§impl From<ImageCompareFunction> for CompareFunction
impl From<ImageCompareFunction> for CompareFunction
source§fn from(value: ImageCompareFunction) -> CompareFunction
fn from(value: ImageCompareFunction) -> 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 ==
.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, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.