1
\$\begingroup\$

I'm drawing my game on a render-to-texture FBO with multisampling. The multisampling works as expected, except for one thing:
No MSAA No MSAA
8x MSAA 8xMSAA
9x MSAA 9xMSAA
(left is a untextured quad, right is a textured quad--the texture is much larger than the quad, the cross in the center of the texture is 2 line primitives)

As you can see, textures seem to suddenly have better downscaling at 9+ samples. Im trying to figure out why this is, because I'd prefer to have this quality of downscaling all the time (even if I'm at, say, 4 samples). The artefacting in the first two images is pretty ugly. I'm not using any mipmapping here, but I did try that as an alternative to this, and it does look much better. However, mipmapping looks a bit blurry compared to the third image, and is still not preferable in comparison.

This was rendered with an NVIDIA GeForce 980M, and it appeared to have the same behavior on other nvidia cards.

\$\endgroup\$
1
  • \$\begingroup\$ "even if I'm at, say, 4 samples" That's like saying I want to have cake and eat it too. If you have 4 samples, you don't have 8. Or 9. \$\endgroup\$ Dec 16, 2017 at 6:04

1 Answer 1

2
\$\begingroup\$

Strict multisampling only executes the fragment shader once per pixel affected by the triangle, regardless of the number of samples. The sample coverage for the triangle affects each fragment's sample coverage mask. So on the edge of triangles, a fragment may only cover a portion of the samples for that pixel.

As such, strict multisampling does not anitalias the interior of triangles. It only antialias the edges.

However, OpenGL does not require strict adherence to multisampling. And even if they did, NVIDIA has been known to outright ignore the specification.

As such, what you are likely seeing here is NVIDIA employing some additional anti-aliasing technique. My immediate thought would have been Coverage Sample Anti-Aliasing (CSAA), but that apparently doesn't exist for the post-Kepler-based GPUs. Regardless of exactly what it is doing, it clearly decided to give you something that the strict multisampling algorithm doesn't call for.

The sudden difference you're seeing between 8 and 9 reflects the fact that NVIDIA doesn't give you 9xMSAA. It's really giving you 16xMSAA. That probably triggers the use of their additional antialiasing technologies.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .