Coverage Unit

From N64brew Wiki
Revision as of 01:07, 8 November 2023 by Jeffythedragonslayer (talk | contribs) (bolded title)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Coverage Unit figures out how much of a pixel is obscured by a primitive by counting covered subpixels. The subpixel mask is a 4x4 grid of bits overlayed on a pixel, where each bit is set if the subpixel is covered. The coverage unit does not simply sum all of the 1's in the subpixel mask but uses a dither mask to discard half of them. The dither mask is shaped like a checkerboard pattern and has the value of 0xa5a5. Thus, the range produced by the coverage unit for a given pixel is not 0 to 16 but 0 to 8.