Skip to main content

Antialiasing

Enum Antialiasing 

Source
pub enum Antialiasing {
    None,
    Fxaa,
    Cmaa2,
}
Expand description

Which tier fills the frame’s one antialiasing slot.

The antialiasing ladder’s eighth decision (docs/notes/rendering.md), taken 2026-08-30 with Counter-Strike 2’s video panel in front of it: the slot holds one filter, so the settings seam holds one ladder rather than two independent bits a panel could switch on together. The renderer still reads RenderEffects::ANTIALIASING and RenderEffects::CMAA2 — bits and from_effects are the join, and ForwardRenderer::add_passes is where the bits become passes.

The rungs above this one — MSAA 2×, 4× and 8× — are that decision’s next slice and are deliberately not here (docs/backlog.md, MSAA was reopened rather than reversed).

Serialized in snake_case, which is name’s spelling. A camera stack names a rung by that word — see crate::stack — and crcbl::settings writes the same word into [engine.video], so the two seams a player’s choice can arrive through spell it once. a_tier_is_spelled_the_way_the_settings_seam_spells_it is what holds the attribute and that function together.

Variants§

§

None

Neither tier: the tonemap writes the caller’s target and no resolve pass is recorded at all.

§

Fxaa

FXAA 3.11 — RenderEffects::ANTIALIASING, one fullscreen pass.

§

Cmaa2

CMAA2 — RenderEffects::CMAA2, three passes and the higher tier.

Implementations§

Source§

impl Antialiasing

Source

pub const ALL: [Self; 3]

The tiers, in the order a settings ladder climbs them.

Ascending by cost and by what it removes, which is the order apps/options’ ANTIALIASING row steps and the order from_name searches.

Source

pub const SLOT: RenderEffects

The two bits one resolve slot is made of.

EffectRequest::resolve clears both before it sets the chosen one, so a set that reached it with both on cannot leave with both on.

Public because a caller that wants no resolve has to name the slot rather than a tier. A fixture forcing one bit off leaves the other one running — which is what a frame reading a single texel back against the tonemap’s own arithmetic cannot afford — and a fixture naming the bits by hand is one that a third rung on the ladder would silently walk past.

Source

pub const fn bits(self) -> RenderEffects

The bits this tier sets, and no others.

Source

pub const fn from_effects(effects: RenderEffects) -> Self

The tier effects draws.

Cmaa2 wins where both bits are set, because that is the choice ForwardRenderer::add_passes makes when it fills the slot: this answers what the frame draws rather than what the set says.

Source

pub const fn name(self) -> &'static str

The snake_case word a settings file spells this tier with.

The one place a rung’s spelling is written, which is why from_name searches ALL through this rather than matching the strings a second time: two spellings of one rung is a row a screen saves and a start-up never reads back.

Source

pub fn from_name(name: &str) -> Option<Self>

The tier name spells, or None for a word no rung wears.

Trait Implementations§

Source§

impl Clone for Antialiasing

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Antialiasing

Source§

impl Debug for Antialiasing

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Antialiasing

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Antialiasing

Source§

impl PartialEq for Antialiasing

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Antialiasing

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Antialiasing

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HalThreadSafe for T
where T: Send + Sync,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.