Jump to content
  • Advertisement
Sign in to follow this  
Tommato

OpenGL MSAA reasons?

This topic is 418 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All

I've read OpenGL Wiki and other resources, hope I've understood MSAA technique overview. But I can't figure out what are reasons to use it. If a multisampled context is created, then render itself takes care of AA, so why (or when) need to do same manually? Can you please explain cases when MSAA is better or/and faster?

Thank you

Share this post


Link to post
Share on other sites
Advertisement
In most modern games, you don't render directly to the context's back-buffer. Instead you're rendering to your own textures which form a "post-processing chain" which eventually leads to an image in the back buffer. Usually only the first texture in that chain needs to be MSAA and the rest are not.

Share this post


Link to post
Share on other sites
MSAA fills the gap left by mipmapping and aniso filtering. Among the most disurbing things in an image are sampling artefacts due to texture minification (either because textures are too large, or because the face they are on is too much sheered), which is addressed in hardware by mipmapping and anisotropic sampling. The other big thing is jagged edges.

That's what a variety of techniques try to address, MSAA being one of the cheapest "just works" approaches for forward rendering. You could as well supersample and scale down, but then you run the pixel shader N times. Other techniques try to detect edges via a variety of heuristics in a post-process pass (depth, normals, color, whatever) and then try to blur the edge regions in a kinda smart way so edges appear smoother. But what's going on there is really just an educated guess. MSAA on the other hand, knows what amount of coverage a triangle has within a fragment, which is arguably a more "scientific" approach to base the blending decision on, and it ideally only runs the fragment shader once.

Share this post


Link to post
Share on other sites

MSAA is a form of supersampling. You are rendering more pixels than what is output to the screen. However all of those pixels in the msaa buffer can change every frame (such as thin grass blades at far distances). You can still get aliasing when MSAA downsamples to resolve to your screen resolution. A lot of techniques, which can be combined with msaa, will deal with the screen resolution buffer and try to anti-alias the final rendered images (FXAA does this by detecting edges/high contrast and blurring).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!