TVP4020
Programmers Reference Manual
Graphics Programming
117
5.12.9
Fog Example
A Gouraud shaded, fogged RGBA trapezoid, with the fog color set to
white. See Appendix D for details of how to calculate depth delta values
- fog values are calculated in a similar way.
// Enable the Color DDA unit in Gouraud shading mode
colorDDAMode.UnitEnable = PERMEDIA_ENABLE
colorDDAMode.Shade = PERMEDIA_GOURAUD_SHADE_MODE
ColorDDAMode(colorDDAMode)
// Enable the Fog unit
fogMode.FogEnable = PERMEDIA_TRUE
FogMode(fogMode)
// Set the fog color to white
FogColor(0xFFFFFFFF)
// Load the color start values and deltas for dominant edge
// and the body of the trapezoid
RStart()
// Set-up the red component start value
dRdx()
// Set-up the red component increments
dRdyDom()
GStart()
// Set-up the green component start value
dGdx()
// Set-up the green component increments
dGdyDom()
BStart()
// Set-up the blue component start value
dBdx ()
// Set-up the blue component increments
dBYDom()
// Load the start value and delta for dominant edge
// and the body of the trapezoid
// Note that the fog deltas are calculated in the same
// way as the color deltas
FStart()
// Set-up the fog component start value
dFdx()
// Set-up the fog component increments
dFdyDom()
// When issuing a Render command the FogEnable bit
// should be set in addition to the fog unit being
// enabled:
// render.FogEnable = PERMEDIA_TRUE
Содержание 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 ...