Digital Foundry: The Future of Anti-Aliasing

Cutting edges.

The current HD console generation is maturing, and developers are looking for ever more ingenious ways of extracting better-quality visuals from the fixed hardware configurations available, while conserving as much system performance as possible.

One of the key components in a quality, polished graphical presentation is anti-aliasing - the process whereby the distortion effects generated by rendering a higher-resolution image into a lower-resolution framebuffer are diminished. The most infamous - and perhaps the most off-putting - aliasing artifacts are of course the dreaded edge "jaggies".

Hardware multi-sample anti-aliasing (MSAA) is the most common solution to these issues, but it comes at a cost: it's heavy on RAM and bandwidth. Also, the deferred shading rendering techniques used in many of the latest games are incompatible with traditional MSAA on DirectX 9 hardware, and can incur a huge memory hit on DX10 and DX11. So, what if you could achieve arguably superior results to MSAA without so much of a performance hit?

Games such as The Saboteur, Halo: Reach and Crysis 2 have all employed their own, more efficient customised anti-aliasing solutions, but perhaps the most popular technique is morphological anti-aliasing (MLAA) - as developed by SCEE's Advantaged Technology Group (ATG) and deployed on games such as God of War 3, Little Big Planet 2, Shift 2: Unleashed and the forthcoming Battlefield 3.

We're not entirely sure if SCEE's code is being used in all cases, but MLAA is becoming increasingly popular - Portal 2, Alice: Madness Returns and Red Faction: Armageddon are three further high-profile examples which appear to be using the same technique.

"MLAA is a fairly expensive algorithm that tries to pattern-match edges, and applies a blur/filter according to the best match," explains one of Criterion Games' tech masterminds, Alex Fry.

"Because it's search-based and uses a large set of patterns, it's expensive but can do a fantastic job when it finds a genuine edge; blurring only that edge and nothing else producing a flawlessly anti-aliased edge. However, when it finds 'false' edges - for example, finding an edge in a noisy texture that it really shouldn't blur - it will exaggerate noise since the blur effect will change direction from frame to frame (different patterns will be matched on each frame), exaggerating temporal aliasing."

MLAA's expensive computational algorithms have hitherto made it suitable running on PlayStation 3 only, with the super-fast SPUs working in parallel to process the image in around 3-4 milliseconds. But MLAA is now being developed for Xbox 360 and PC too in the form of Jimenez MLAA, created by Jorge Jimenez, Jose I. Echevarria and Diego Gutierrez.

Jimenez MLAA on a range of first person shooters: Battlefield: Bad Company 2, Borderlands and Bulletstorm. As post-process AA considers a flat 2D screen for analysis, we can use our HD captures in lieu of running in real-time. Note that HUD elements are also processed. In-game you'd hope to process the image before HUD is overlaid on top. Use the full-screen button on the player for 720p resolution.

Jimenez MLAA runs on GPU, and there have been suggestions that the technique loses an element of quality as graphics cores handle somewhat simpler code than SPUs. The Jimenez team take issue with this and can point to the results seen in the video clips in this feature, independently generated by Digital Foundry on clips of our choosing, filtered with their code.

"We can't speak for all the MLAA(-like) implementations out there, but we think our current version 1.6 - the one used for these comparisons - has raised the quality bar considerably," they say.

"In our tests, it produces results on par (when not superior) to CPU MLAA. One of our best features is that we are very conservative with the image: we only process where we are sure there is a perceptible edge; and version 1.6 does a pretty good job searching for perceptible edges. This allows preserving the maximum sharpness while still processing all the relevant jaggies."

FXAA adopts a completely different approach, being more along the lines of what Alex Fry calls a "heuristic blur filter" better suited to noisier imagery. Timothy Lottes has developed specific "console" and "quality" iterations of FXAA designed to get the best out of current console and PC hardware.

"FXAA3 Quality - the PC version - is designed to take advantage of the feature and performance advantage PC GPUs have to provide very high quality," he says.

"FXAA3 Console is designed to be the best-possible quality under the constraint of using as close to one millisecond of GPU time as possible per 720p frame on both Xbox 360 and PS3. Visually the PC version is sharper and has higher quality on near-horizontal and near-vertical edges."

Lottes' original purpose in creating the technology was to "find practical techniques on today's hardware to bring the pixel quality of games closer to that of off-line rendered film," and this is an approach that is more than just smoothing off the jaggies.

"Beyond targeting edge aliasing like MLAA and DLAA, FXAA reduces the visual shimmering and flickering effect of sub-pixel aliasing by lowering the contrast of pixel and sub-pixel sized features," Lottes explains, revealing that his techniques are also faster than competing post-process anti-aliasing technologies.

"In terms of run-time, FXAA3 Quality is less expensive than MLAA, and FXAA3 Console is less expensive than DLAA. There is also another version of FXAA which has much higher quality than MLAA (less distortion) when applied to text and HUD elements."

Comments (80)

Comments for this article are now closed, but please feel free to continue chatting on the forum!

  • Loading... hold tight!