Morphological Anti-Aliasing is a Smooth Operator
With the introduction of Morphological Anti-Aliasing (MLAA) to all the cards in our new AMD Radeon™ HD 6000 series, we thought everyone could use a lowdown on what the technology does, and how it benefits gamers, and when it works best. We sat down with Senior Technical Marketing Manager – a.k.a Graphics Guru—David Nalasco to answer all your questions about MLAA, how it’s different from the other anti-aliasing methods, and why users—especially gamers—should care.
We got so much great information fromDavid that we have decided to break this into a two-part series. The first part provides some history on MLAA and how it differs from traditional anti-aliasing methods. The second installment will explain how AMD is implementing MLAA and why it’s such a great addition for gamers.
Part 1: How MLAA came to be and how it differs from traditional AA methods
Can you tell us a little bit about the history/background of Morphological Anti-Aliasing (MLAA)?
MLAA springs from concepts that have been around for a while, specifically techniques like “computer vision,” where you attempt to isolate certain shapes, patterns or edges in a 2D image. MLAA takes that approach and applies it to real-time graphics. For every rendered frame, it’s identifying edges where you might see aliasing artifacts and applying these algorithms to fix them. The technique, the basic algorithms and ideas, have been around since the ‘90s, but the ability to do them quickly and reliably enough to use them in real-time games is something that’s only become possible in the last year or so.
Briefly explain what MLAA is and the difference from traditional anti-aliasing.
The basic idea of MLAA is that it works as a post-process effect. Rather than doing the anti-aliasing while we render the scene, we wait for each frame to finish rendering normally and then, before we present it to the display device, we run it through another pass of shader processing to perform the filtering.
The main advantage of anti-aliasing as a post-processing effect is that it doesn’t matter what rendering technique you use to generate the scene or the image, you can apply this technique almost anywhere – and that really helps with compatibility. So, as new games are developed and they use new rendering techniques and new rendering algorithms, the expectation is that MLAA will be able to work seamlessly with all of them, without any significant changes required.
Can you explain a bit about how traditional anti-aliasing works?
The anti-aliasing technique that is used most commonly today is Multi-Sample Anti-Aliasing (MSAA). Computer-generated images are built from 3D triangles, and they are rendered one triangle at a time. With MSAA, we look for pixels that lie on the edges of those triangles, and take multiple sub-pixel samples within those pixels to determine how much of each one is covered by the triangle. We don’t have to do this for pixels that lie completely inside or outside the triangle, and that’s what allows MSAA to be relatively fast, because it doesn’t have to be applied on every single pixel on the screen. The downside is that you have to know where all the triangles are in a scene for it to work. So, once the image has been rendered and converted into pixels, all the triangle information is discarded, and you can no longer use it for anti-aliasing.
The difference with MLAA is that it’s a post-process, so we don’t have to know anything about where the triangles are or how a scene was created. We can still apply this anti-aliasing effect and get rid of jagged edges.
Anything more you’d like to add on the technical side of how MLAA actually works?
Fundamentally, MLAA is based on the concept of edge detection. So, essentially, we use a post-processing filter to detect high contrast edges in a scene (by high-contrast we mean light-colored pixels bordering dark-colored pixels.) We look for edges that have pixels sides with a zigzag pattern on them that are generally associated with aliasing. In general, it’s unusual to see a pattern like this that persists across multiple frames that is NOT due to aliasing. So, we run a pre-pass over the scene to locate these edges, and once we’ve found them, we run another pass that determines what the ideal edge would look like if there was no aliasing. Then we do a blending operation between the light-colored side of the edge and the dark-colored side of the edge to create something that looks closer to the ideal shape. It’s implemented in a couple of shader passes that happen after the final frame is rendered. And it only operates on those edges of the scene not every single pixel, which allows us to speed the process up.
What are some of the challenges or limitations to MLAA?
One of the limitations is that it will cause a slight softening of the image. When the image is slightly softer, rather than having very sharp, high-contrast edges, it looks more like something you’d see on film or television. Some people, purely subjectively, may prefer something sharper. So it won’t be the perfect solution for everyone.
The other case that presents a challenge for MLAA is very fine text. If you have small text on the screen that’s only a single pixel wide, MLAA will still attempt to anti-alias it and soften the edges, which may make it a little more difficult to read. In the future, there are ways that we’ll be able to address this, such as having game developers apply it selectively. So, rather than having us force it on globally via the user controls, a game developer could use the same code, but apply it only to the parts of the scene where it works well, and not apply it to very fine text.
Stay tuned for more details on how MLAA is being implemented by AMD and how it benefits gamers!
David Nalasco is the Senior Technical Marketing Manager, Product Group at AMD. His postings are his own opinions and may not represent AMD’s positions, strategies or opinions. Links to third party sites, and references to third party trademarks, are provided for convenience and illustrative purposes only. Unless explicitly stated, AMD is not responsible for the contents of such links, and no third party endorsement of AMD or any of its products is implied.



i have a problem with my HD 5770 when i put this setting on, i open the iTunes Store and it looks REALLY WIERD, like you said, text is kind of wierd in the section of the most popular songs and when an Ad moves from the top screen, every image is bluured. Any answer plz?
I bought an HD 6870 for this feature, and MLAA is very exciting, but without any kind of support for the OpenGL API it feels like it’s a feature simply going to waste.
Java games using OpenGL would benefit immensely from MLAA. (I may be looking at Minecraft here.)