mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 13:54:21 +00:00
Initial pipeline abstraction
This commit is contained in:
21
Source/Render/Pipeline/DepthStencilState.rs
Normal file
21
Source/Render/Pipeline/DepthStencilState.rs
Normal file
@ -0,0 +1,21 @@
|
||||
use super::{CompareFunction, DepthBiasState, StencilState, TextureFormat};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DepthStencilState {
|
||||
/// Format of the depth/stencil buffer, must be special depth format. Must match the the format
|
||||
/// of the depth/stencil attachment in [`CommandEncoder::begin_render_pass`].
|
||||
pub format: TextureFormat,
|
||||
|
||||
/// If disabled, depth will not be written to.
|
||||
pub depth_write_enabled: bool,
|
||||
|
||||
/// Comparison function used to compare depth values in the depth test.
|
||||
pub depth_compare: CompareFunction,
|
||||
|
||||
/// Stencil state.
|
||||
pub stencil: StencilState,
|
||||
|
||||
/// Depth bias state.
|
||||
pub bias: DepthBiasState,
|
||||
}
|
Reference in New Issue
Block a user