Graphics Reference
In-Depth Information
Figure 3.59. Various rasterized geometric primitives.
also look more closely at some of the fine details of using this process with multisample
anti-aliasing (MSAA) enabled.
Fragment generation. The first step in rasterization is to determine which pixels of the
render target are considered to be covered by the current primitive. This operation is per-
formed by using a set of rasterization rules, which vary depending on the type of primitive
that is being rasterized, as well as on the type of render target. If a render target supports
MSAA, the rasterization process is different than if a standard render target is used. We
will discuss the implications of MSAA later in this section, after the standard concepts have
been introduced. With a grid of pixels representing the render target, the rasterizer stage
must determine which of the pixels are "covered" by a primitive. Quotation marks were
used here because there are many cases in which a pixel location is selected for rasteriza-
tion but it is not completely covered by the primitive.
To understand how this can happen,
we first need to explore how fragment gen-
eration is performed. We will begin with the
triangle rasterization process. Each pixel of
the render target uses a point at the center of
the pixel as the key for rasterization. Since
it is at the center of the pixel, and each pixel
is 1 unit large (in screen space), the center
of the pixel is 0.5 units by 0.5 units from the
edge of the pixel boundary. When a pixel
center is completely covered by a primitive,
it is clearly selected to produce a fragment.
Since the pixel center can also land on one
of the boundary edges of a primitive, some
Figure 3.60. Pixels at the boundaries of multiple
primitives.
Search WWH ::




Custom Search