mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 22:04:24 +00:00
Initial pipeline abstraction
This commit is contained in:
36
Source/Render/Pipeline/StencilOperation.rs
Normal file
36
Source/Render/Pipeline/StencilOperation.rs
Normal file
@ -0,0 +1,36 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Operation to perform on the stencil value.
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub enum StencilOperation {
|
||||
/// Keep stencil value unchanged.
|
||||
Keep = 0,
|
||||
|
||||
/// Set stencil value to zero.
|
||||
Zero = 1,
|
||||
|
||||
/// Replace stencil value with value provided in most recent call to [`RenderPass::set_stencil_reference`].
|
||||
Replace = 2,
|
||||
|
||||
/// Bitwise inverts stencil value.
|
||||
Invert = 3,
|
||||
|
||||
/// Increments stencil value by one, clamping on overflow.
|
||||
IncrementClamp = 4,
|
||||
|
||||
/// Decrements stencil value by one, clamping on underflow.
|
||||
DecrementClamp = 5,
|
||||
|
||||
/// Increments stencil value by one, wrapping on overflow.
|
||||
IncrementWrap = 6,
|
||||
|
||||
/// Decrements stencil value by one, wrapping on underflow.
|
||||
DecrementWrap = 7,
|
||||
}
|
||||
|
||||
impl Default for StencilOperation {
|
||||
fn default() -> Self {
|
||||
Self::Keep
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user