![background image](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169285.webp)
A Gouraud Shaded Triangle
TVP4020
Programmers Reference Manual
276
Appendix D. A Gouraud Shaded Triangle
without using the Delta Unit
For best performance, the Delta unit in P
ERMEDIA
should be used to
calculate the edge deltas used by the Graphics Processor. For backward
compatibility, or special situations, the edge delta registers may be
programmed directly, and this appendix describes the calculations that
are needed to do this correctly.
In this section we show how to render a typical 3D graphics primitive
without using the Delta Unit. The primitive is a Gouraud shaded, depth
buffered triangle. This appendix is included to understand any legacy
TVP4010
software to allow alternative rasterization techniques to be
used. For this example, assume the coordinate origin is bottom left of
the window and drawing will be from top to bottom. P
ERMEDIA
can draw
from top to bottom or bottom to top.
D1
A Gouraud Shaded Triangle
Consider a triangle with vertices, v
1
, v
2
and v
3
where each vertex
comprises X, Y and Z coordinates, shown below. Each vertex has a
different color made up of red, green and blue (R, G and B) components.
Top half
Lower half
(X
1
Y
1
Z
1
R
1
G
1
B
1
)
(X
2
Y
2
Z
2
R
2
G
2
B
2
)
(X
3
Y
3
Z
3
R
3
G
3
B
3
)
V
1
V
2
V
3
Figure D1
Example Triangle
The diagram makes a distinction between top and bottom halves
because P
ERMEDIA
is designed to rasterize screen aligned trapezoids
and flat topped or bottomed triangles as shown below:
Summary of Contents for TVP4020 PERMEDIA 2
Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...