Jump to content

Leaderboard

Popular Content

Showing most liked content on 03/03/2019 in all areas

  1. There are literally dozens of different anti-aliasing methods, though most of the newer and cheaper ones operate in screen space after the image is already rendered, which is not the case for SSAA and MSAA. SSAA is the first and easiest to understand since it essentially renders the game at a higher resolution (multiple "samples" per output pixel) and scales it back down to the output resolution similar to how you would scale an image in Photoshop. This eliminates aliasing across the entire image, but is obviously very expensive. MSAA optimizes this method by first testing how many different triangles are intersecting those sample points within each pixel and then only computing the shading for at most one sample per individual triangle. This effectively limits MSAA to the edges of geometry, which is the place where most aliasing happens (especially in old games; unfortunately, during the last 15 years or so shader aliasing became a major problem as well). Foliage, chain-link fences, grates, etc. are usually made using alpha-test textures, which means the geometry edge is not where the visible part of the object ends since it's just a transparent texture on a much larger surface. Thus MSAA by itself will not help with the aliasing here, but there are ways to manually make use of the texture alpha to explicitly tell the MSAA implementation "hey I want this pixel multi-sampled" (this is called "Alpha-To-Coverage"). Both SSAA and MSAA can use different patterns for the extra samples per pixel. A regular grid is the easiest to implement in hardware, but if the geometry edges align with the pattern (i.e. nearly horizontal or vertical lines), there will still be visible aliasing. Thus many different variants were introduced like rotated grids or semi-random distributions. MSAA can additionally vary the amount of samples used for testing how many triangles intersect this pixel (coverage samples) and for computing the actual shading (color samples) as the former are very cheap in terms of performance compared to the latter and can improve the results by weighting the color samples more accurately (examples of this are called CSAA [Nvidia] and EQAA [AMD]). I'm not sure, but that sounds to me like you're reading about the generic theory of image resampling (how to scale an image from one resolution to another), which happens to be the last part of the SSAA/MSAA process. Surprisingly, downscaling is an incredibly difficult problem even though you have all the information available. It's almost impossible to tell which information is or is not "important" to preserve during this process so that the end result neither looks excessively blurry nor has additional artifacts that weren't in the original (e.g. aliasing, ringing). Regular SSAA and MSAA as implemented in the hardware will by default just use a simple average of the samples within each pixel ("box filter"), but some other variants have been introduced over the years as well.
    1 like
×
×
  • Create New...