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 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 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 moreimpl 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
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
Compare self to
key
and return true
if they are equal.