There is a multitude of factors that affect the visual quality of a video game, including display resolution, shadow quality, drawing distance, special effects, and anti-aliasing. There’s a high chance that you’ve already encountered most of these terms before, most likely during tweaking video game graphic options in the game’s menu, but have you ever wondered what these terms exactly mean?

Today we’ll learn a bit about anti-aliasing. What does anti aliasing do and how does it impact the final image and the game’s performance?

Introduction

When you take a photo of a real-world object with the use of a smartphone, there’s always some information lost in the process. That’s because the smartphone’s camera tries to fit whatever is being captured within the space limited by the available pixels.

The denser the pixels – or rather, the higher the resolution and PPI (pixels per inch) of the device – the more accurate the photo. However, to avoid the loss of information and capture the thing exactly as it appears in the real world, you’d need an infinitely high display resolution with infinite PPI, because the real world is, without diving into physics, Planck units, and quantum mechanics, more or less continuous.

The world doesn’t use pixels to present itself to you, so the best we can do to store an image of a real-world object in a digital form is to use approximations, where we assign each pixel a value that represents a corresponding piece of the captured fragment of the real scene. If you’ll try to zoom in a photo, you’ll get to the point of seeing a single pixel and there’s nothing beyond that. In the real world, you can “zoom in” much, much further, with the use of binoculars or a telescope, for example.

So, what does it all have to do with anti-aliasing? Imagine that you want to draw a straight line using one of the drawing programs. If it’s a perfectly horizontal or vertical line, there won’t be any issue – even if you zoom in, you won’t see anything suspicious right away.

But now imagine that you want to rotate this line by 45 degrees and zoom again. You’ll quickly notice that what appeared to be a continuous line now looks more like stairs made of blocks that barely touch each other’s corners. The line became jagged because pixels are rectangular-shaped, they can display only one color at a time, and they are arranged to form a continuous, rectangular grid of pixels. Making a smooth, tilted line, or any curve for that matter is simply impossible under such circumstances.

Jagged lines are not very pleasant to look at, and so people came up with different solutions, known collectively as anti-aliasing, to trick the eye.

What is Anti-Aliasing?

Anti-aliasing is what we do to get rid of the jagged lines displayed on the screen. This is achieved by either applying one of the anti-aliasing filters or getting a screen with a much higher display resolution – if the pixels are small enough that they can’t be distinguished from one another, the effect of jagged lines will be significantly reduced.

Keep in mind that display resolution is not the same as screen size. You can have 4K resolution on both 20-inch and 50-inch screens – pixels will simply be more densely packed on the smaller screen, thus reducing the effect of aliasing. In other words, a 4K 20-inch monitor will have a higher PPI value than a 4K 50-inch monitor, and the higher PPI is exactly what you need if you want to get rid of jagged lines.

How Does Anti-Aliasing Improve Graphics Quality?

There are different types of anti-aliasing filters and there are differences in how they all work to make the jagged lines look smoother, but most of them share the same basic idea – they perform additional computations in order to fix the jaggies in the displayed image. This means that whichever AA option you choose, you must be prepared for some performance loss.

What types of anti-aliasing are there? Here’s a bit of basic knowledge in form of examples.

SSAA (supersampling anti-aliasing) is one of the best AA filters but it hurts the performance a lot. It’s the oldest one on the list and thus not recommended to use anymore, as there are modern alternatives that give satisfying results for a significantly lower performance cost. It works by generating the image in a higher resolution than your display resolution and then scales down the image to match your native resolution. On the downscaled image each pixel becomes an average value of its neighboring pixels from the upscaled image, thus making jagged lines much less visible.

MSAA (multisample anti-aliasing) is an evolution of SSAA and can be considered a direct upgrade, as it works similarly, but takes a smarter approach. Just like SSAA, it generates an image at a higher resolution first, but the filter is applied only on the parts that are actually jagged, as opposed to SSAA that smoothens the entire image. This naturally results in much better performance, but there are still better alternatives to use these days. Both SSAA and MSAA are considered traditional sampling-based methods.

MLAA (morphological anti-aliasing) is the first AA filter from the shader-based (or post-processing) method family on the list. As opposed to traditional methods, shader-based methods apply the filter after the image is generated. MLAA uses pattern recognition to detect edges that need smoothing, but while it’s a cost-effective method when it comes to performance, it has trouble with areas that contain a lot of thin lines and may generate blurry results where details should have been preserved.

FXAA (fast approximate anti-aliasing) works similarly to MLAA and comes with a similar drawback, which is the risk of smoothing areas that do not need the smoothing, which results in the loss of details. The main difference between FXAA and MLAA is that FXAA works more aggressively – it has better coverage but also blurs the final image more than MLAA. Due to its low-performance cost, it’s still being widely used on low-end systems to this day.

SMAA (enhanced subpixel morphological antialiasing) was invented to overcome the drawbacks of MLAA and FXAA and it does a pretty good job at this – it not only avoids adding too much blur where it’s not needed, saving the details from being lost in the process but also more accurately recognizes areas where smoothing is necessary.

TXAA (temporal anti-aliasing) is Nvidia’s implementation of TAA and as such it only works on Nvidia graphic cards. It uses multiple techniques together, including MSAA and post-processing, to achieve better results for a relatively low-performance cost. It also adjusts itself in accordance with previous frames to detect edges that would be difficult to find otherwise. It’s worth noting, however, that TXAA favors image quality over performance, so some FPS loss is to be expected. TXAA achieves the best results in scenes in motion and cinematics.

DLSS (deep learning super sampling) is also made by Nvidia and is considered a revolutionary technique. As opposed to the traditional AA methods that generate an upscaled image to downscale it later, DLSS generates a downscaled image and upscales it to native resolution with the use of artificial intelligence, which is much faster than simply generating a native resolution image. The main purpose of DLSS is to allow computers to run games at higher resolution without losing performance, but it doubles as an anti-aliasing tool. If you value better image quality, though, you’d be rather more interested in DLAA (deep learning anti-aliasing), which works like a more potent version of TXAA.

The Evolution of Anti-Aliasing in Gaming

First video games didn’t have any anti-aliasing. Remember games like Super Mario Bros.? Back in the old days if there was any anti-aliasing going on, it was done by the artists on the sprite design stage, meaning the artists were drawing the sprites in a way that was meant to make the edges look smoother. The first attempts at implementing proper anti-aliasing filters took place in the early 1990s, but it was mostly experimental. AA only started to become popular as 3D games started to appear more often on the market, allowing the games to look better than ever before.

As computers got more powerful, the use of more advanced anti-aliasing filters became more frequent as well. Although some of the AA filters don’t go easy on GPU, there are also filters that get the basic job done for barely any performance cost. Thanks to this, the use of AA filters remains one of the most efficient ways to improve graphics quality in video games. If you can afford a high PPI (pixels per inch) monitor, though, it may be worth it to take that route instead – on such screens the pixels are so small that it’s nigh impossible to see jagged lines anymore, even without any anti-aliasing technology turned on.

Conclusion

Anti-aliasing describes different ways of reducing the effect of jagged lines displayed on a screen. The goal is to smoothen the jaggies to the point of them being barely noticeable, which can improve immersion, especially in 3D video games. Anti-aliasing comes in various shapes and forms, but the most commonly used ones are AA filters that use the graphic card to make adjustments to the generated image to fix the jagged lines.

Depending on the selected filter, you can expect a varying level of quality increase and performance loss – more demanding AA filters can stress the GPU quite a lot, but they’ll also provide you with a much better result. However, if you’re using a low-end system, there are also some filters that will do wonders without turning your PC into a jet engine.