Enum naga::ConservativeDepth
source · pub enum ConservativeDepth {
GreaterEqual,
LessEqual,
Unchanged,
}
Expand description
Enables adjusting depth without disabling early Z.
To use in a shader:
- GLSL:
layout (depth_<greater/less/unchanged/any>) out float gl_FragDepth;
depth_any
option behaves as if the layout qualifier was not present.
- HLSL:
SV_DepthGreaterEqual
/SV_DepthLessEqual
/SV_Depth
- SPIR-V:
ExecutionMode Depth<Greater/Less/Unchanged>
- WGSL:
@early_depth_test(greater_equal/less_equal/unchanged)
For more, see:
Variants§
GreaterEqual
Shader may rewrite depth only with a value greater than calculated.
LessEqual
Shader may rewrite depth smaller than one that would have been written without the modification.
Unchanged
Shader may not rewrite depth value.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for ConservativeDepth
impl<'arbitrary> Arbitrary<'arbitrary> for ConservativeDepth
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for ConservativeDepth
impl Clone for ConservativeDepth
source§fn clone(&self) -> ConservativeDepth
fn clone(&self) -> ConservativeDepth
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConservativeDepth
impl Debug for ConservativeDepth
source§impl<'de> Deserialize<'de> for ConservativeDepth
impl<'de> Deserialize<'de> for ConservativeDepth
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for ConservativeDepth
impl Hash for ConservativeDepth
source§impl Ord for ConservativeDepth
impl Ord for ConservativeDepth
source§fn cmp(&self, other: &ConservativeDepth) -> Ordering
fn cmp(&self, other: &ConservativeDepth) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ConservativeDepth
impl PartialEq for ConservativeDepth
source§fn eq(&self, other: &ConservativeDepth) -> bool
fn eq(&self, other: &ConservativeDepth) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ConservativeDepth
impl PartialOrd for ConservativeDepth
source§fn partial_cmp(&self, other: &ConservativeDepth) -> Option<Ordering>
fn partial_cmp(&self, other: &ConservativeDepth) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ConservativeDepth
impl Serialize for ConservativeDepth
impl Copy for ConservativeDepth
impl Eq for ConservativeDepth
impl StructuralEq for ConservativeDepth
impl StructuralPartialEq for ConservativeDepth
Auto Trait Implementations§
impl RefUnwindSafe for ConservativeDepth
impl Send for ConservativeDepth
impl Sync for ConservativeDepth
impl Unpin for ConservativeDepth
impl UnwindSafe for ConservativeDepth
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.