SHARING: Temporal Anti-Aliasing (TAA) fx for jit.gl.pass
Apr 11 2023 | 4:49 pm
Some time ago, the Jitter team and I presented some new Jitter objects and functionalities we've been working on (video here). Much of the stuff presented there has already been released, but the temporal anti-aliasing FX didn't make it in the latest Max updates (for several reasons). We decided to share this pass fx for those interested while waiting for it to be included as a built-in tool in the next Max versions.
TAA 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 (sub-pixel jittering). Pixels sampled in past frames are blended with pixels sampled in the current frame to produce an anti-aliased image.
The shader named "getGeometry.jxs" applies a sub-pixel jittering to the geometry (in the vertex shader), while "TAA.jxs," contained in the jit.gl.pass effect named "taa.jxp", accumulates and averages the samples over multiple frames.
I hope this patch can serve as a starting point for implementing this terrific anti-aliasing technique in your projects and as an invitation to explore jit.gl.pass functionalities to their full potential.