rootvg_msaa/
lib.rs

1mod pipeline;
2
3pub use pipeline::MsaaPipeline;
4
5/// An antialiasing strategy.
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum Antialiasing {
8    /// Multisample AA with 2 samples
9    MSAAx2,
10    /// Multisample AA with 4 samples
11    MSAAx4,
12    /// Multisample AA with 8 samples
13    MSAAx8,
14    /// Multisample AA with 16 samples
15    MSAAx16,
16}
17
18impl Antialiasing {
19    /// Returns the amount of samples of the [`Antialiasing`].
20    pub fn sample_count(self) -> u32 {
21        match self {
22            Antialiasing::MSAAx2 => 2,
23            Antialiasing::MSAAx4 => 4,
24            Antialiasing::MSAAx8 => 8,
25            Antialiasing::MSAAx16 => 16,
26        }
27    }
28}