Sample Page

Alpha to coverage[1][2][3] is a multisampling computer graphics technique, that replaces alpha blending with a coverage mask. This achieves order-independent transparency for when anti-aliasing or semi-transparent textures are used. This particular technique is useful for situations where dense foliage or grass must be rendered in a video game.[4]

Alpha to coverage is a sub-pixel version of screen-door transparency, a technique which uses a dithering pattern to simulate transparency with only fully opaque and fully transparent pixels.[5]

Mechanism

Alpha-to-coverage converts the alpha component output from the pixel shader into a temporary coverage mask, where the number of bits set is a function of the alpha value.[6] This temporary mask is then bitwise ANDed with the fragment’s coverage mask.[6] To ensure consistency as alpha values change, the generated mask is required to be monotonic: the mask for a smaller alpha value must be a subset of the mask for a larger value.[7]

Because the mask is applied at the sub-pixel resolution of a multisample render target, the number of available transparency levels is limited by the sample count.[7] For example, 4x MSAA allows for five distinct coverage levels (0 to 4 samples), which can lead to Quantization (image processing) artifacts.

See also

References

  1. ^ Golus, Ben (21 October 2021). “Anti-aliased Alpha Test: The Esoteric Alpha To Coverage”. Medium.[better source needed]
  2. ^ “Alpha to coverage | Semantic Scholar”.
  3. ^ “Common Rendering Mistakes: How to Find Them and How to Fix Them | Oculus”.
  4. ^ “Configuring Blending Functionality (Windows)”. Microsoft Developer Network. Retrieved 2013-01-27. Alpha-to-coverage is a multisampling technique that is most useful for situations such as dense foliage where there are several overlapping polygons that use alpha transparency to define edges within the surface
  5. ^ Enderton, E; Sintorn, E; Shirley, P; Luebke, D (2011). “Stochastic Transparency” (PDF). IEEE Transactions on Visualization and Computer Graphics. 17 (8): 1036–1047. doi:10.1109/TVCG.2010.123. ISSN 1077-2626.
  6. ^ a b “17.3.3”. OpenGL 4.6 Core Profile Specification (PDF). The Khronos Group.
  7. ^ a b Akenine-Möller, Tomas; Haines, Eric; Hoffman, Naty (2018). Real-Time Rendering (4th ed.). CRC Press.