The third stage corresponds to rasterization. At this point, the objects have 2D screen coordinates, so pixels in the projection area must be found. The process of finding all the pixels that surround an on-screen object is called Rasterization. This process can be seen as a synchronization point between the objects in the scene and the pixels on the screen.
For each object, the rasterizer performs two processes:
- Triangle Setup.
- Triangle Traversal.
Triangle Setup generates the data that will be sent to Triangle Traversal. It includes the equations for the edges of an object on the screen. After this, Triangle Traversal lists the pixels that are covered by the area of the polygon object. In this way, it generates a group of pixels called fragments; and from this the word Fragment Shader, which is also used to refer to an individual pixel.