Implement MSAA for triangle pipeline in iced_wgpu
This commit is contained in:
parent
4969bfdb66
commit
dadae12253
15 changed files with 539 additions and 73 deletions
|
|
@ -7,4 +7,26 @@ pub struct Settings {
|
|||
///
|
||||
/// If `None` is provided, a default system font will be chosen.
|
||||
pub default_font: Option<&'static [u8]>,
|
||||
|
||||
/// The antialiasing strategy that will be used for triangle primitives.
|
||||
pub antialiasing: Option<MSAA>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum MSAA {
|
||||
X2,
|
||||
X4,
|
||||
X8,
|
||||
X16,
|
||||
}
|
||||
|
||||
impl MSAA {
|
||||
pub(crate) fn sample_count(&self) -> u32 {
|
||||
match self {
|
||||
MSAA::X2 => 2,
|
||||
MSAA::X4 => 4,
|
||||
MSAA::X8 => 8,
|
||||
MSAA::X16 => 16,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue