librashader_common/shader_features.rs
1use bitflags::bitflags;
2
3bitflags! {
4 /// Enable feature flags for shaders.
5 #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
6 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7 #[cfg_attr(feature = "serde", serde(transparent))]
8 #[repr(C)]
9 pub struct ShaderFeatures: u32 {
10 /// No features are enabled.
11 const NONE = 0b00000000;
12 /// Enable `OriginalAspect` and `OriginalAspectRotated` uniforms.
13 ///
14 /// Note that this flag only enables the `_HAS_ORIGINALASPECT_UNIFORMS` define.
15 /// The uniforms will be bound unconditionally if found in reflection.
16 const ORIGINAL_ASPECT_UNIFORMS = 0b00000001;
17 /// Enable `FrameTimeDelta` and `OriginalFPS` uniforms.
18 ///
19 /// Note that this flag only enables the `_HAS_FRAMETIME_UNIFORMS` define.
20 /// The uniforms will be bound unconditionally if found in reflection.
21 const FRAMETIME_UNIFORMS = 0b00000010;
22 }
23}