![Texas Instruments TVP4020 PERMEDIA 2 Скачать руководство пользователя страница 115](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169115.webp)
Graphics Programming
TVP4020
Programmers Reference Manual
106
In CI mode, the color index is placed in the lower byte of the 32 bit
register (i.e., the red component).
5.11.2
Gouraud Shading
When in Gouraud shading mode, the Color DDA unit performs linear
interpolation given a set of start and increment values. Clamping is used
to ensure that the interpolated value does not underflow or overflow the
permitted color range.
For a Gouraud shaded trapezoid, P
ERMEDIA
interpolates from the
dominant edge of a trapezoid to the subordinate edges. This means that
two increment values are required per color component, one to move
along the dominant edge and one to move across the span to the
subordinate edge. This is illustrated in the diagram below, where C
represents a color component (red, green, blue or color index). Alpha is
not interpolated and stays at its initial value.
dCdyD om
dCdX
Subordinate Edges
D ominant Edge
CStart = the initial color value
dCdyDom = color gradient in the Y direction along the dominant edge
dCdx = color gradient in the X direction
Figure 5.38
Color Interpolation
See Appendix D4 Delta values for a Gouraud Shaded Triangle.
For Gouraud shaded lines, each line is treated as the dominant edge of
a trapezoid, and so no dCdx increment is required.
To allow accurate interpolation, the increment values are specified in a
17bit fixed point format. The format is 2's complement with 1 bit sign, 5
bits integer and 11 bits fraction:
9 bit integer
11 bit fraction
Ignored
Ignored
0
31
Figure 5.39
Fixed Point Color Format
Содержание 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 ...