Initial pipeline abstraction

This commit is contained in:
Werner
2021-11-23 20:09:05 -03:00
parent b23bc27f55
commit f45d465c3f
23 changed files with 943 additions and 58 deletions

View 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
}
}