Coverage Unit

From N64brew Wiki
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.