Multisample anti-aliasing

Multisample anti-aliasing

Multisample anti-aliasing (MSAA) is a type of anti-aliasing, a technique used in computer graphics to improve image quality.

Contents

Definition

The term generally refers to a special case of supersampling. Initial implementations of full-scene anti-aliasing (FSAA) worked conceptually by simply rendering a scene at a higher resolution, and then downsampling to a lower-resolution output. Most modern GPUs are capable of this form of antialiasing, but it greatly taxes resources such as texture bandwidth and fillrate. (If a game is highly TCL-bound or CPU-bound, supersampling can be used without much performance hit.)

According to the OpenGL GL_ARB_multisample[1] specification, "multisampling" refers to a specific optimization of supersampling. The specification dictates that the renderer evaluate the fragment program once per pixel, and only "truly" supersample the depth and stencil values. (This is not the same as supersampling, but by the OpenGL 1.5 specification[2], the definition had been updated to include fully supersampling implementations as well.)

In graphics literature in general, "multisampling" refers to any special case of supersampling where some components of the final image are not fully supersampled. The lists below refer specifically to the ARB_multisample definition.

Description

When a fragment is rendered with multisample anti-aliasing, if any of the multi sample locations in a pixel are covered by the triangle that created it, a shading computation must be performed for that triangle. Shading inputs (texture coordinates, etc) are interpolated from values stored at the triangles vertices using the pixel center as the interpolating and sampling point. If the pixel center is outside the triangle, shading inputs are extrapolated. Extrapolation can be avoided by using centroid sampling, where the shading inputs are sampled at the covered multisample location nearest to the pixel center, but may result in non-uniform screen space sampling near edges[3].

Advantages

  • The pixel shader usually only needs to be evaluated once per pixel.
  • The edges of polygons (the most obvious source of aliasing in 3D graphics) are antialiased.

Disadvantages

Alpha testing

Alpha testing is a technique common to older video games used to render translucent objects by rejecting pixels from being written to the framebuffer[4] If the alpha value of a translucent fragment is not within a specified range, it will be discarded after alpha testing. Because this is performed on a pixel by pixel basis, the image does not receive the benefits of multi-sampling (all of the multisamples in a pixel are discarded based on the alpha test) for these pixels. The resulting image may contain aliasing along the edges of transparent objects or edges within textures, although the image quality will be no worse than it would be without any anti-aliasing. [5] Translucent objects that are modelled using alpha-test textures will also be aliased due to alpha testing. This effect can be minimized by rendering objects with transparent textures multiple times, although this would result in a high performance reduction for scenes containing many transparent objects. [6]

Aliasing

Because multi-sampling calculates textures only once per pixel, aliasing and other artifacts will still be visible inside rendered polygons where fragment shader output contains high frequency components.

Sampling Methods

Point Sampling

In a point sampled mask, the coverage bit for each multisample is only set if the multisample location is located inside the rendered primitive. Samples are never taken from outside a rendered primitive, so images produced using point-sampling will be geometrically correct, but filtering quality may be low because the proportion of bits set in the pixel’s coverage mask may not be equal to the proportion of the pixel that is actually covered by the fragment in question.

Area Sampling

Filtering quality can be improved by using area sampled masks. In this method, the number of bits set in a coverage mask for a pixel should be proportionate to the actual area coverage of the fragment. This will result in some coverage bits being set for multisamples that are not actually located within the rendered primitive, and can cause aliasing and other artifacts.

Sample patterns

Regular grid

A regular grid sample pattern, where multisample locations form an evenly spaced grid throughout the pixel, is easy to implement and simplifies attribute evaluation (i.e. setting subpixel masks, sampling color and depth). This method is computationally expensive due to the large number of samples. Edge optimization is poor for screen-aligned edges, but image quality is good when the number of multisamples is large.

Sparse regular grid

A sparse regular grid sample pattern is a subset of samples that are chosen from the regular grid sample pattern. As with the regular grid, attribute evaluation is simplified due to regular spacing. The method is less computationally expensive due to having a fewer number of samples. Edge optimization is good for screen aligned edges, and image quality is good for a moderate number of multisamples.

Stochastic sample patterns

A stochastic sample pattern is a random distribution of multisamples throughout the pixel. The irregular spacing of samples makes attribute evaluation complicated. The method is cost efficient due to low sample count (compared to regular grid patterns). Edge optimization with this method, although sub-optimal for screen aligned edges. Image quality is excellent for a moderate number of samples.

Quality

Compared to supersampling, multisample anti-aliasing can provide similar quality at higher performance, or better quality for the same performance. Further improved results can be achieved by using rotated grid subpixel masks. The additional bandwidth required by multi-sampling is reasonably low if Z and colour compression are available. [7]

See also

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Anti-aliasing — In digital signal processing, anti aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high resolution signal at a lower resolution. Anti aliasing is used in digital photography, computer… …   Wikipedia

  • Spatial anti-aliasing — In digital signal processing, spatial anti aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high resolution image at a lower resolution. Anti aliasing is used in digital photography, computer… …   Wikipedia

  • Сглаживание — Эта статья должна быть полностью переписана. На странице обсуждения могут быть пояснения …   Википедия

  • MSAA — MSAA: Microsoft Active Accessibility Multisample anti aliasing (англ.) …   Википедия

  • S.T.A.L.K.E.R.: Shadow of Chernobyl — S.T.A.L.K.E.R. redirects here. For the prequel, see S.T.A.L.K.E.R.: Clear Sky. For the sequel, see S.T.A.L.K.E.R.: Call of Pripyat. S.T.A.L.K.E.R.: Shadow of Chernobyl The European cover art for S.T.A.L.K.E.R.: Shadow of Chernobyl …   Wikipedia

  • GeForce 8 Series — NVIDIA GeForce 8 Series Codename(s) G80, G84, G86, G92, G98 Release date 2006 Entry level GPU 8100 (IGP), 8200 (IGP), 8300 (both integrated and discrete variants), 8400 Mid range GPU 8500, 8600 High end GPU 8800 …   Wikipedia

  • Supersampling — is an antialiasing technique, the process of eliminating jagged and pixelated edges (aliasing). It is a method of smoothing images rendered in computer games or other programs that generate imagery.Overview. Since pixels are uniformly colored and …   Wikipedia

  • Killzone 2 — Infobox VG title = Killzone 2 developer = Guerrilla Games publisher = SCE designer = Mathijs De Jonge engine = released = February 2009 [ [http://www.eurogamer.net/article.php?article id=137092 Killzone 2 gets release date News // PS3 ///… …   Wikipedia

  • MSAA — may stand for:* Microsoft Active Accessibility, a computer software development component * Multiple Sclerosis Association of America * Multisample anti aliasing, a 3D rendering technique …   Wikipedia

  • Call of Juarez: Bound in Blood — Обложка игры Разработчик Techland Издатель Ubisoft Entertainment Локализатор 1С[1] …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”