Alpha to Coverage

Off topic discussion. Talk about gaming and life in general. Be awesome to each other.
Post Reply
User avatar
Posts: 1150
Joined: Wed Sep 14, 2016 6:22 pm

Alpha to Coverage

Post by TheLacus » Sun Aug 13, 2017 10:27 am

I came across this article about aliasing with alpha channel, I think it's an interesting read

Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

User avatar
Posts: 41
Joined: Thu Nov 24, 2016 1:19 am

Re: Alpha to Coverage

Post by afritz1 » Mon Aug 14, 2017 4:12 am

Anti-aliasing is a fascinating topic. I've seen alpha-to-coverage used in a couple games, like Arma 2 and 3.

My favorite technique comes from a book called "Computer Graphics: Principles and Practice". It's done in a ray tracing context, and it involves subdividing a pixel only when some inner samples differ enough (a.k.a., adaptive super-sampling). It's a lot faster than typical super-sampling because it mostly only needs to work on the edges of texels and geometry, and it should have about the same quality (except for pathological cases, like checkerboards).

What interested me the most about the algorithm is how it can reuse so much data. At a subdivision depth of 0 (at the start), it samples each pixel at the top left corner, and then it reuses samples from the adjacent pixels to the right, bottom, and bottom right for the other three corners. You can blend those four samples together to get fast (but a little blurry) anti-aliasing for essentially no cost! This was mind-blowing when I first read about it, because you're basically getting the quality of four samples for the price of one. Practically speaking, though, you'd also want to sample within the pixel a few times instead of just on the edges, but regardless, I think it is a very clever concept.

Narf the Mouse
Posts: 839
Joined: Mon Nov 30, 2015 6:32 pm

Re: Alpha to Coverage

Post by Narf the Mouse » Tue Sep 12, 2017 4:41 am

There's two areas that, I've found, yield the greatest improvements in speed:

1) Algorithms
2) Memory/data

And with modern OS's, the former is a lot easier than the latter.
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

Post Reply