Struct vulkano::pipeline::graphics::depth_stencil::DepthStencilState
source · pub struct DepthStencilState {
pub flags: DepthStencilStateFlags,
pub depth: Option<DepthState>,
pub depth_bounds: Option<RangeInclusive<f32>>,
pub stencil: Option<StencilState>,
pub _ne: NonExhaustive,
}
Expand description
The state in a graphics pipeline describing how the depth, depth bounds and stencil tests should behave.
Fields§
§flags: DepthStencilStateFlags
Additional properties of the depth/stencil state.
The default value is empty.
depth: Option<DepthState>
The state of the depth test.
If set to None
, the depth test is disabled, all fragments will pass and no depth writes
are performed.
The default value is None
.
depth_bounds: Option<RangeInclusive<f32>>
The minimum and maximum depth values to use for the depth bounds test. Fragments with values outside this range are discarded.
If set to None
, the depth bounds test is disabled, all fragments will pass.
The default value is None
.
stencil: Option<StencilState>
The state of the stencil test.
If set to None
, the stencil test is disabled, all fragments will pass and no stencil
writes are performed.
The default value is None
.
_ne: NonExhaustive
Implementations§
source§impl DepthStencilState
impl DepthStencilState
sourcepub fn disabled() -> Self
👎Deprecated since 0.34.0: use DepthStencilState::default
instead
pub fn disabled() -> Self
DepthStencilState::default
insteadCreates a DepthStencilState
where all tests are disabled and have no effect.
sourcepub fn simple_depth_test() -> Self
👎Deprecated since 0.34.0: use DepthState::simple
instead
pub fn simple_depth_test() -> Self
DepthState::simple
insteadCreates a DepthStencilState
with a Less
depth test, depth_write
set to true, and other
tests disabled.
Trait Implementations§
source§impl Clone for DepthStencilState
impl Clone for DepthStencilState
source§fn clone(&self) -> DepthStencilState
fn clone(&self) -> DepthStencilState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more