Module bevy_core_pipeline::smaa

source ·
Expand description

Subpixel morphological antialiasing (SMAA).

SMAA is a 2011 antialiasing technique that takes an aliased image and smooths out the jaggies, making edges smoother. It’s been used in numerous games and has become a staple postprocessing technique. Compared to MSAA, SMAA has the advantage of compatibility with deferred rendering and reduction of GPU memory bandwidth. Compared to FXAA, SMAA has the advantage of improved quality, but the disadvantage of reduced performance. Compared to TAA, SMAA has the advantage of stability and lack of ghosting artifacts, but has the disadvantage of not supporting temporal accumulation, which have made SMAA less popular when advanced photorealistic rendering features are used in recent years.

To use SMAA, add SmaaSettings to a bevy_render::camera::Camera. In a pinch, you can simply use the default settings (via the Default trait) for a high-quality, high-performance appearance. When using SMAA, you will likely want to turn the default MSAA off by inserting the [bevy_render::Msaa::Off] resource into the App.

Those who have used SMAA in other engines should be aware that Bevy doesn’t yet support the following more advanced features of SMAA:

  • The temporal variant.

  • Depth- and chroma-based edge detection.

  • Predicated thresholding.

  • Compatibility with SSAA and MSAA.

Structs§

Enums§