NEOLearn

Anti-aliasing

Smooth jagged edges with MSAA, FXAA, SMAA or TAA, sharpen the result with contrast-adaptive sharpening, and which methods work in web builds.

Updated October 20, 2026

On this page

Anti-aliasing smooths the jagged, stair-stepped edges of polygons and the shimmering of thin details. Every method is a component on the camera. MSAA is on by default; the others are post-processing passes you add.

Choosing a method#

MethodComponentQualityCostWeb builds
MSAAMsaaClean geometry edges; does nothing for texture or shader aliasing.Grows with the sample count and with lots of small triangles.Yes
FXAAFxaaSmooths every edge, slightly blurry.Very cheap.Yes
SMAASmaaSharper than FXAA, better on text and thin lines.Cheap.Yes
TAATemporalAntiAliasingBest overall, also on textures and shading; can ghost on fast motion.Needs extra prepasses.No

A common choice is MSAA alone for simple scenes, SMAA when you turn MSAA off for an effect, and TAA on the desktop for the cleanest image. Example: cargo run --example anti_aliasing (desktop only) lets you switch between them.

MSAA#

Msaa is a component on the camera with four values: Off, Sample2, Sample4 (the default) and Sample8.

Rust
commands.spawn((Camera3d::default(), Msaa::Sample8));

Turn MSAA off (Msaa::Off) when you use TAA, SSAO, SSR or deferred rendering, and in web builds when you use motion blur. Materials with AlphaMode::AlphaToCoverage get smoother cut-out edges with MSAA on.

FXAA#

Rust
use neo::anti_alias::fxaa::{Fxaa, Sensitivity};

commands.spawn((
    Camera3d::default(),
    Msaa::Off,
    Fxaa { edge_threshold: Sensitivity::Ultra, ..default() },
));

edge_threshold and edge_threshold_min take Sensitivity::Low, Medium, High (the default), Ultra or Extreme. Higher sensitivity smooths more edges and blurs more detail.

SMAA#

Rust
use neo::anti_alias::smaa::{Smaa, SmaaPreset};

commands.spawn((Camera3d::default(), Msaa::Off, Smaa { preset: SmaaPreset::High }));

SmaaPreset is Low, Medium, High (the default) or Ultra. SMAA uses lookup tables from the smaa_luts feature, which NEO's builds include.

TAA#

Temporal anti-aliasing jitters the camera slightly each frame and blends the results over time:

Rust
use neo::anti_alias::taa::TemporalAntiAliasing;

commands.spawn((Camera3d::default(), Msaa::Off, TemporalAntiAliasing::default()));
  • It adds the depth and motion-vector prepasses and the camera jitter for you.
  • The camera must have Msaa::Off; with MSAA on, the engine warns and TAA doesn't run correctly.
  • Set reset: true after a camera cut or teleport to drop the old frames and avoid ghosting.
  • Alpha-blended meshes don't write motion vectors, so they can smear.
  • It pairs with ShadowFilteringMethod::Temporal and SSAO, whose noise it smooths.

TAA needs the depth prepass, which WebGL 2 can't read, so don't use it in web builds. Guard it with #[cfg(not(target_arch = "wasm32"))] if your game also ships there.

Sharpening#

Anti-aliasing softens the image a little. ContrastAdaptiveSharpening brings detail back, and pairs well with TAA:

Rust
use neo::anti_alias::contrast_adaptive_sharpening::ContrastAdaptiveSharpening;

commands.spawn((
    Camera3d::default(),
    ContrastAdaptiveSharpening { sharpening_strength: 0.6, ..default() },
));

sharpening_strength runs from 0 to 1 (default 0.6). Leave denoise off.

Not in NEO's builds#

DLSS (Dlss) needs the dlss cargo feature and NVIDIA's SDK; NEO's builds don't include it.

Next steps#