Skip to content

Antialiasing ​

Antialiasing is a technique that removes jagged edges (aliasing) during 3D rendering to produce smooth outlines and surfaces. RedGPU provides temporal accumulation-based TAA, hardware multisampling-based MSAA, and post-processing filter-based FXAA, all centrally controlled via redGPUContext.antialiasingManager (AntialiasingManager).


1. Default Behavior & Activation Rules ​

RedGPU's antialiasing system operates exclusively. Only one technique can be active at a time, and enabling a new technique automatically disables the previously active one.

Auto-Selection at Initialization ​

Upon engine initialization, the optimal technique is automatically enabled based on the display pixel ratio (window.devicePixelRatio):

  • High-DPI Display (devicePixelRatio > 1.0): TAA is enabled by default (useTAA = true).
  • Standard Display (devicePixelRatio <= 1.0): MSAA is enabled by default (useMSAA = true).
javascript
const { antialiasingManager } = redGPUContext;

// Switch antialiasing mode (automatically disables other modes)
antialiasingManager.useTAA = true;

2. Comparison of Techniques ​

Choose the appropriate technique based on your target rendering quality and performance budget.

TechniqueMethodQuality & CharacteristicsCostComparison Image
NONEDisabledRaw rendering without antialiasing (visible jagged edges)NoneNone
TAATemporal AccumulationResolves both geometry edges and internal shader/texture aliasingMediumTAA
MSAAHardware SamplingSmooths only geometry outlines (does not affect internal textures or alpha cutoff edges)HighMSAA
FXAAPost-processingFast screen-space edge smoothing (accompanied by slight image softness)Very LowFXAA

TIP

Live Testing in Examples: You can switch and compare TAA, MSAA, FXAA, and NONE modes in real time on any running scene using the ANTIALIASING dropdown menu located in the UI of every RedGPU example.

Antialiasing Control


Next Step: Learn TAA