Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

1.3 Aliasing and Antialiasing Techniques

Lesson 4 of 32 in the free Computer Graphics notes on Siksha Sarovar, written by Rohit Jangra.

Why Lines Have Stairs

A digital display can only set a finite grid of samples. Mathematical objects (lines, curves) are continuous. Sampling a continuous signal below the Nyquist rate introduces aliasing: high-frequency detail is misrepresented as low-frequency artifacts (jaggies, moire patterns, crawling edges, temporal popping).

Antialiasing Techniques

1. Supersampling (SSAA)

Render at higher resolution (e.g., 2x or 4x) and downsample with a filter (box, gaussian) to the display. Highest quality, highest cost. MSAA is a fragment-level optimization that samples coverage multiple times but shades once per pixel.

2. Area Sampling

Treat each pixel as a small square area. Color = weighted integral of the geometry over that area. A line that covers 30% of a pixel contributes 30% intensity. Produces smooth edges without rendering at higher resolution.

3. Prefiltering

Filter the continuous signal before sampling. The geometry is convolved with a filter kernel, then sampled once per pixel. Conceptually rigorous (matches signal-processing theory) but expensive for arbitrary scenes; common for procedural textures (mipmapping, anisotropic filtering).

4. Postfiltering

Sample first (often supersample) then filter the resulting samples to compute final pixel color. Most modern AA (FXAA, SMAA, TAA) is a postfilter operating on the framebuffer.

Comparison Table

TechniqueWhen appliedCostQuality
SupersamplingRender timeHighVery high
Area samplingRender timeMediumHigh
PrefilteringBefore samplingHard for geometryHigh (textures)
Postfiltering (FXAA/TAA)Post-processLow to mediumVariable, fast

Temporal Aliasing

A wagon-wheel rotating faster than half the frame rate appears to rotate backward. Temporal Antialiasing (TAA) averages samples across frames using motion vectors. Without TAA, fine geometry sparkles in motion.

Practical Notes

  • For lines, the Wu line algorithm is a classic antialiased alternative to Bresenham, distributing intensity across two adjacent pixels per step.
  • For text, hinting + subpixel rendering (ClearType) treats each LCD subpixel as an independent sample, tripling horizontal resolution for color text.
  • Excessive AA blurs detail; modern engines balance crispness and smoothness with TAA + sharpening.