Temporal anti-aliasing (TAA) is a spatial anti-aliasing technique for computer-generated video that combines information from past frames and the current frame to remove jaggies in the current frame. In TAA, each pixel is sampled once per frame but in each frame the sample is at a different location within the pixel. Pixels sampled in past frames are blended with pixels sampled in the current frame to produce an anti-aliased image.
TAA compared to MSAA
Prior to the development of TAA, MSAA was the dominant anti-aliasing technique. MSAA samples (renders) each pixel multiple times at different locations within the pixel and averages the samples to produce the final pixel value. In contrast, TAA samples each pixel only once per frame, but it samples the pixels at a different locations in different frames. This makes TAA faster than MSAA. In parts of the picture without motion, TAA effectively computes MSAA over multiple frames and achieves the same quality as MSAA with lower computational cost.
TAA compared to FXAA
TAA and FXAA both sample each pixel only once per frame, but FXAA does not take into account pixels sampled in past frames, so FXAA is simpler and faster but can not achieve the same image quality as TAA or MSAA.
Sampling the pixels at a different position in each frame can be achieved by adding a per-frame "jitter" when rendering the frames. The "jitter" is a 2D offset that shifts the pixel grid, and its X and Y magnitude are between 0 and 1.
When combining pixels sampled in past frames with pixels sampled in the current frame, care needs to be taken to avoid blending pixels that contain different objects, which would produce ghosting or motion-blurring artifacts. Different implementation of TAA have different ways of achieving this. Possible methods include:
- Using motion vectors from the game engine to perform motion compensation before blending.
- Limiting (clamping) the final value of a pixel by the values of pixels surrounding it.
TAA compared to DLSS
Nvidia's DLSS operates on similar principles to TAA. Like TAA, it uses information from past frames to produce the current frame. Unlike TAA, DLSS does not sample every pixel in every frame. Instead, it samples different pixels in different frames and uses pixels sampled in past frames to fill in the unsampled pixels in the current frame. DLSS uses machine learning to combine samples in the current frame and past frames, and it can be thought of as an advanced TAA implementation.
- Multisample anti-aliasing
- Fast approximate anti-aliasing
- Deep learning super sampling
- Brian Kari, Epic Games "High Quality Temporal Supersampling".
- Ziyad Barakat "Temporal Anti Aliasing – Step by Step".
- Edward Liu, NVIDIA "DLSS 2.0 - Image Reconstruction for Real-time Rendering with Deep Learning"
- yellowstone6 "How DLSS 2.0 works (for gamers)".