Struct vulkano::pipeline::depth_stencil::Stencil
[−]
[src]
pub struct Stencil { pub compare: Compare, pub pass_op: StencilOp, pub fail_op: StencilOp, pub depth_fail_op: StencilOp, pub compare_mask: Option<u32>, pub write_mask: Option<u32>, pub reference: Option<u32>, }
Configuration of a stencil test.
Fields
compare: Compare
The comparison to perform between the existing stencil value in the stencil buffer, and
the reference value (given by reference
).
pass_op: StencilOp
The operation to perform when both the depth test and the stencil test passed.
fail_op: StencilOp
The operation to perform when the stencil test failed.
depth_fail_op: StencilOp
The operation to perform when the stencil test passed but the depth test failed.
compare_mask: Option<u32>
Selects the bits of the unsigned integer stencil values participating in the stencil test.
Ignored if compare
is Never
or Always
.
If None
, then this value is dynamic and will need to be set when drawing. Doesn't apply
if compare
is Never
or Always
.
Note that if this value is Some
in stencil_front
, it must also be Some
in
stencil_back
(but the content can be different). If this value is None
in
stencil_front
, then it must also be None
in stencil_back
. This rule doesn't apply
if compare
is Never
or Always
.
write_mask: Option<u32>
Selects the bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment.
If None
, then this value is dynamic and will need to be set when drawing.
Note that if this value is Some
in stencil_front
, it must also be Some
in
stencil_back
(but the content can be different). If this value is None
in
stencil_front
, then it must also be None
in stencil_back
.
reference: Option<u32>
Reference value that is used in the unsigned stencil comparison.
If None
, then this value is dynamic and will need to be set when drawing.
Note that if this value is Some
in stencil_front
, it must also be Some
in
stencil_back
(but the content can be different). If this value is None
in
stencil_front
, then it must also be None
in stencil_back
.
Methods
impl Stencil
[src]
fn always_keep(&self) -> bool
Returns true if the stencil operation will always result in Keep
.
Trait Implementations
impl Debug for Stencil
[src]
impl Copy for Stencil
[src]
impl Clone for Stencil
[src]
fn clone(&self) -> Stencil
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more