Sunday, August 12, 2012

Three-dimensional computer graphics architecture


Rasterization
The rasterization stage comprises two steps. The scan con-version step decomposes a triangle into a set of pixels, and
calculates the attributes of each pixel, such as colour, depth,
alpha, and texture coordinates. The pixel processing step
performs texture mapping, depth test and alpha blending for
individual pixels. Figure 2 shows the rasterization stage of
the graphics pipeline.
  There are two distinct mechanisms that are quite popular
for the scan conversion step:  linear  interpolation
algorithm and linear edge function algorithm. In linear in-terpolation-based algorithms
4

, the triangle set-up step first
computes the slopes, with respect to the X-axis, for all the
attributes along each edge of the triangle. Next, the edge
processing step iterates along the edges and computes the
two end points of a horizontal pixel segment, called a span.
Finally, the span processing step iterates along each span
and computes the attributes for each pixel on the span
through linear interpolation (Figure 3).
  In linear edge function-based algorithms
5
, each edge of
the triangle is defined by a linear edge function. The triangle
is scan converted by evaluating, at each pixel’s centre, the
function for all edges, and processing only those pixels that
are inside all the edges. The attributes are also computed
from the linear functions. Typically, the traversal of a trian-

No comments:

Post a Comment