Multisample Details

AA works at the edges. It is when alpha testing within a polygon taht you see aliasing.

… right, my question is why AA works along the edge of a polygon that is completely covered by another (translucently texture mapped) polygon. My understanding leads me to believe that since the translucent polygon has entire coverage over all samples on its interior, how does AA occur along the underneath polygon edges, visible through the translucent polygon’s interior?

I realize this is sort of a derivative question with regards to the earlier discussion of aliasing and alpha testing, I just didn’t want to start a whole new thread.

The edges of a polygon are antialiased, whatever any other polygon (maybe translucent) will be drawn on top of it. This is not coverage, this is how multisampling basically works.

So my only remaining question is, “How am I getting AA on the edges of polygons behind a translucent polygon?”
Because blending doesn’t affect the results of multisample.

OK, when you draw the first quad, you get various samples on the edge that say, “the color red on this pixel was seen 3 of the 6 times, and the background (say, black) was seen the rest of the time,” and stuff of that nature.

So, then you blend a polygon on top of this. The blend changes the pixel value to, “The blend result of red and this color was seen 3 times, and the blend result of the background and this color were seen the rest of the time.” That’s why it still works; blending blends with all of the colors (or, where at the edge of the blended triangle, only with the appropriate samples underneath).

In essence, multisample is supersampling, except that the fragment program is only run once per actual pixel. So it figures out which samples from the sample pattern (whether regular grid or whatever) are being written to by the fragment program and which aren’t. Then it performs pixel operations for each of them.

Oh I see, so the “resolving the buffer” part at the end is really resolving fragments that have already had alpha blending applied to them. Thanks for the explanation!