Graphics Programming
TVP4020
Programmers Reference Manual
48
5.3
Rasterizer Unit
The Rasterizer decomposes a given primitive into a series of fragments
for processing by the rest of the HyperPipeline.
P
ERMEDIA
can directly rasterize:
•
aliased screen aligned trapezoids
•
aliased single pixel wide lines
•
aliased single pixel points
•
rectangles
All other primitives are treated as one or more of the above.
5.3.1
Trapezoids
P
ERMEDIA
's basic area primitive is the screen aligned trapezoid. This is
characterized by having top and bottom edges parallel to the X axis. The
side edges may be vertical (a rectangle), but in general will be diagonal.
The top or bottom edges can degenerate into points in which case we
are left with either flat topped or flat bottomed triangles. Any polygon can
be decomposed into screen aligned trapezoids or triangles. Usually,
polygons are decomposed
into triangles because the interpolation of
values over non-triangular polygons is ill defined. The Rasterizer does
handle flat topped and flat bottomed 'bow tie' polygons which are a
special case of screen aligned trapezoids.
To render a triangle, the approach adopted to determine which
fragments are to be drawn is known as 'edge walking'. Suppose the
aliased triangle shown in Fig. 5.5 was to be rendered from top to bottom
and the origin was bottom left of the window. Starting at (X1, Y1) then
decrementing Y and using the slope equations for edges 1-2 and 1-3,
the intersection of each edge on each scanline can be calculated. This
results in a span of fragments per scanline for the top trapezoid. The
same method can be used for the bottom trapezoid using slopes 2-3 and
1-3.
It is usually required that adjacent triangles or polygons which share an
edge or vertex are drawn such that pixels which make up the edge or
vertex get drawn exactly once. This may be achieved by omitting the
pixels down the left or the right sides and the pixels along the top or
lower sides. P
ERMEDIA
has adopted the convention of omitting the pixels
down the right hand edge. Control over whether the pixels along the top
or lower sides are omitted depends on the start Y value and the number
of scanlines to be covered. With the example, if StartY = Y1 and the
number of scanlines is set to Y1-Y2, the lower edge of the top half of the
Содержание TVP4020 PERMEDIA 2
Страница 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Страница 47: ...Memory I O and Organization TVP4020 Programmers Reference Manual 38 Texture address TextureBaseAddress T W S ...
Страница 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Страница 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Страница 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Страница 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Страница 323: ...Index TVP4020 Programmers Reference Manual 314 ...