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:
20
Source/Render/Pipeline/DepthBiasState.rs
Normal file
20
Source/Render/Pipeline/DepthBiasState.rs
Normal file
@ -0,0 +1,20 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DepthBiasState {
|
||||
/// Constant depth biasing factor, in basic units of the depth format.
|
||||
pub constant: i32,
|
||||
|
||||
/// Slope depth biasing factor.
|
||||
pub slope_scale: f32,
|
||||
|
||||
/// Depth bias clamp value (absolute).
|
||||
pub clamp: f32,
|
||||
}
|
||||
|
||||
impl DepthBiasState {
|
||||
/// Returns true if the depth biasing is enabled.
|
||||
pub fn IsEnabled(&self) -> bool {
|
||||
self.constant != 0 || self.slope_scale != 0.0
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user