use serde::Serialize;
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum ShaderFormat {
Dxbc,
Dxil,
SpirV,
Glsl,
D3d9,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum Stage {
Vertex,
Pixel,
Compute,
Hull,
Domain,
Geometry,
Mesh,
RayGeneration,
Intersection,
AnyHit,
ClosestHit,
Miss,
Callable,
}
impl Stage {
pub fn is_ray_tracing(self) -> bool {
matches!(
self,
Self::RayGeneration
| Self::Intersection
| Self::AnyHit
| Self::ClosestHit
| Self::Miss
| Self::Callable
)
}
}