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:
These values are sent to the pipelined blocks downstream for other computations, such as texture sampling, color blending, and so on.
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.
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.
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.