
- Computer Graphics - Home
- Computer Graphics Basics
- Computer Graphics Applications
- Graphics APIs and Pipelines
- Computer Graphics Maths
- Sets and Mapping
- Solving Quadratic Equations
- Computer Graphics Trigonometry
- Computer Graphics Vectors
- Linear Interpolation
- Computer Graphics Devices
- Cathode Ray Tube
- Raster Scan Display
- Random Scan Device
- Phosphorescence Color CRT
- Flat Panel Displays
- 3D Viewing Devices
- Images Pixels and Geometry
- Color Models
- Line Generation
- Line Generation Algorithm
- DDA Algorithm
- Bresenham's Line Generation Algorithm
- Mid-point Line Generation Algorithm
- Circle Generation
- Circle Generation Algorithm
- Bresenham's Circle Generation Algorithm
- Mid-point Circle Generation Algorithm
- Ellipse Generation Algorithm
- Polygon Filling
- Polygon Filling Algorithm
- Scan Line Algorithm
- Flood Filling Algorithm
- Boundary Fill Algorithm
- 4 and 8 Connected Polygon
- Inside Outside Test
- 2D Transformation
- 2D Transformation
- Transformation Between Coordinate System
- Affine Transformation
- Raster Methods Transformation
- 2D Viewing
- Viewing Pipeline and Reference Frame
- Window Viewport Coordinate Transformation
- Viewing & Clipping
- Point Clipping Algorithm
- Cohen-Sutherland Line Clipping
- Cyrus-Beck Line Clipping Algorithm
- Polygon Clipping Sutherland–Hodgman Algorithm
- Text Clipping
- Clipping Techniques
- Bitmap Graphics
- 3D Viewing Transformation
- 3D Computer Graphics
- Parallel Projection
- Orthographic Projection
- Oblique Projection
- Perspective Projection
- 3D Transformation
- Rotation with Quaternions
- Modelling and Coordinate Systems
- Back-face Culling
- Lighting in 3D Graphics
- Shadowing in 3D Graphics
- 3D Object Representation
- Represnting Polygons
- Computer Graphics Surfaces
- Visible Surface Detection
- 3D Objects Representation
- Computer Graphics Curves
- Computer Graphics Curves
- Types of Curves
- Bezier Curves and Surfaces
- B-Spline Curves and Surfaces
- Data Structures For Graphics
- Triangle Meshes
- Scene Graphs
- Spatial Data Structure
- Binary Space Partitioning
- Tiling Multidimensional Arrays
- Color Theory
- Colorimetry
- Chromatic Adaptation
- Color Appearance
- Antialiasing
- Ray Tracing
- Ray Tracing Algorithm
- Perspective Ray Tracing
- Computing Viewing Rays
- Ray-Object Intersection
- Shading in Ray Tracing
- Transparency and Refraction
- Constructive Solid Geometry
- Texture Mapping
- Texture Values
- Texture Coordinate Function
- Antialiasing Texture Lookups
- Procedural 3D Textures
- Reflection Models
- Real-World Materials
- Implementing Reflection Models
- Specular Reflection Models
- Smooth-Layered Model
- Rough-Layered Model
- Surface Shading
- Diffuse Shading
- Phong Shading
- Artistic Shading
- Computer Animation
- Computer Animation
- Keyframe Animation
- Morphing Animation
- Motion Path Animation
- Deformation Animation
- Character Animation
- Physics-Based Animation
- Procedural Animation Techniques
- Computer Graphics Fractals
Antialiasing in Computer Graphics
Antialiasing is an important technique that is used in computer graphics to improve the visual quality of images. It helps remove the jagged edges sometimes called "jaggies" that can appear when a smooth object is represented on a grid of pixels. These jagged edges result from the process of converting a continuous image into a discrete pixel-based image, which is a common problem in digital displays and rasterized images.
In this chapter, we will cover the basics of antialiasing, how it works, and provide examples of its use in computer graphics.
What is Antialiasing?
Antialiasing is a technique which minimize the aliasing effect. The aliasing effect refers to the distortion that occurs when an image is sampled at a low frequency. When smooth curves or lines are drawn on a grid of pixels, the representation often appears jagged because the pixels can't perfectly align with the continuous shape of the object. This results in jagged edges, also called "jaggies." See the following figure for the effect.

The cause of aliasing is undersampling. Undersampling happens when the image is sampled at a frequency lower than the Nyquist Sampling Frequency. According to the Nyquist theorem, the sampling rate should be at least twice the highest frequency in the image to prevent information loss. If the sampling rate is too low, important details in the image are lost, resulting in jagged edges.
To prevent aliasing, the Nyquist sampling frequency shows the sampling rate is high enough to capture the necessary details of the image. The maximum sampling interval is known as the Nyquist Sampling Interval. If the sampling interval is too large, aliasing effects such as jagged lines will occur.
Methods of Antialiasing
There are several methods used for antialiasing in computer graphics. Each method has its own way of smoothing out the jagged edges and making the image look more refined. The most commonly used methods are high-resolution display, post-filtering, pre-filtering, and pixel phasing.
High-Resolution Display
One of the simplest ways to reduce the aliasing effect is to use a high-resolution display. By increasing the number of pixels used to display an image, the jaggies become much smaller and less noticeable. High-resolution displays make the jagged edges so small that they become indistinguishable to the human eye, resulting in smoother images. Some displays are retina displays on Apple devices or OLED displays.
Post-Filtering (Supersampling)
Post-filtering, also known as supersampling, is another method used to reduce aliasing. In this technique, the screen is treated as if it is made up of a much finer grid. This increases the sampling resolution, and the pixel size is effectively reduced. After sampling at a higher resolution, the image is displayed at the original screen resolution by averaging the intensity from each subpixel. This technique smooths the jagged edges, making them less noticeable.
For example, Supersample Antialiasing (SSAA) or Full-Scene Antialiasing (FSAA) is used to achieve the best image quality. SSAA samples the image at a higher resolution and then downsamples it to the screen resolution.
Another more efficient method is Multisampling Antialiasing (MSAA). This is a faster and less computationally expensive alternative of supersampling. MSAA reduces the amount of processing required while still improving image quality. Graphics card manufacturers have developed even more advanced versions of these techniques, such as CSAA by NVIDIA and CFAA by AMD.
Pre-Filtering (Area Sampling)
Pre-filtering, also known as area sampling, calculates the intensity of each pixel based on how much the pixel overlaps with the objects in the scene. This method works by computing the pixel color proportionally to the overlap of the objects with the pixel area.
For example, imagine a line passing through two pixels. The pixel that covers more of the line (for example, 90%) will display a higher intensity. The pixel that covers less of the line (for example, 10%) will display a lower intensity. If the pixel overlaps different color areas, the final pixel color is determined by averaging the colors of the overlapping areas.
Pixel Phasing
Pixel phasing is the positions of pixels that are shifted to align more closely with the geometry of the object. Some systems even allow the size of individual pixels to be adjusted, which helps distribute intensities more accurately.
This technique can be used to reduce aliasing by the pixel positions and sizes are adjusted to better match the actual object being displayed smooth.
Types of Antialiasing
Antialiasing techniques are classified into two broad categories: spatial antialiasing and post-process antialiasing.
1. Spatial Antialiasing
Spatial antialiasing is used when the image being represented at a low resolution has jagged edges. The goal is to minimize distortion when representing a higher-resolution image at a lower resolution. Means supersampling antialiasing (SSAA) and multisample antialiasing (MSAA) fall under this category.
2. Post-Process Antialiasing
Post-process antialiasing works by blurring the image during the rendering process. It is faster than spatial antialiasing and is commonly used in real-time applications such as video games.
Examples of post-process antialiasing include temporal antialiasing and enhanced subpixel morphological antialiasing (SMAA).
Applications of Antialiasing
Applications of antialiasing include: Compensating for Line Intensity Differences and Smoothing Area Boundaries.
Compensating for Line Intensity Differences
When a horizontal line and a diagonal line are displayed on a raster display, the number of pixels required to display both lines is the same. Even for diagonal line which is longer. The longer line will appear less intense because its pixels are spread out over a larger area.
Antialiasing techniques can help compensate for this by adjusting the pixel intensity based on the length of the line. This ensures both lines appear with similar intensity.
Smoothing Area Boundaries
Antialiasing is also useful for removing jagged edges along area boundaries in images. For example, when rendering a curved object, antialiasing can smooth out the edges by adjusting the pixel positions or intensities along the boundary. This can be applied to scanline algorithms to improve the appearance of objects in raster graphics.
Conclusion
In this chapter, we explained the concept of antialiasing in computer graphics and how it helps reduce the jagged edges that appear when rendering smooth objects on a pixel grid. We began by understanding the basics of antialiasing, including the cause of jagged edges, which is under sampling. We then looked at the different methods of antialiasing, such as high-resolution displays, post-filtering, pre-filtering, and pixel phasing.
We also understood two main types of antialiasing: spatial antialiasing and post-process antialiasing, and their uses in real-time applications.