RS: Rasterizer

The Rasterizer’s main job is implied in its name: to generate pixels that cover the interior of the primitive. The primitives are either triangles or rectangles. For each pixel, the RS generates the following attributes:

Pixels on the edge of primitives have partial coverage values. Interiors are full.

These values are sent to the pipelined blocks downstream for other computations, such as texture sampling, color blending, and so on.

Figure 12.3.1  RS State and Input/Output

Scissoring
Scissoring is commonly used to eliminate running performance-intensive clipping code in the geometry processing stage of a graphics pipeline. You do this by projecting the clipping rectangle at the near plane larger than the scissor rectangle. The rasterizer can then efficiently eliminate the portion outside of the screen rectangle.

The RSP geometry processing is performed in fixed-point arithmetic. The clipped rectangle boundary is not a perfect rectangle, because of precision errors. This artifact can also be eliminated using the scissoring rectangle.

Figure 12.3.2  Scissor/Clipping/Screen Rectangles

Triangle A is scissored, but not clipped. B, C and E are trivially rejected because no pixels are enumerated. Only D is clipped and scissored.

Table 1  gsDPSetScissor(ulx, uly, lrx, lry)
Parameter Value
ulx upper left x
uly upper left y
lrx lower right x
lry lower right y

Note: Rectangles are scissored with some restrictions. In 1CYCLE and 2CYCLE mode, rectangles are scissored the same as triangles. In FILL and COPY mode, rectangles are scissored to the nearest four pixel boundary; this might require rectangles to be scissored in screen space by the game software.

Copyright © 1999
Nintendo of America Inc. All Rights Reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated January, 1999