![background image](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169121.webp)
Graphics Programming
TVP4020
Programmers Reference Manual
112
where:
FStart = initial fog value.
dFdx = Fog gradient in the X direction.
dFdyDom = Fog gradient along the dominant edge of a primitive.
Note that for fogged lines the dFdx delta is not required.
The fog index is specified as an 18bit fixed point value. The format is 2's
complement with 2 bits integer and 16 bits fraction.
0
8
16
24
31
Integer
Not used
Fraction
Not used
Sign bit
Figure 5.42
Fog Interpolant Fixed Point Format
The fog DDA calculates a fog index value which is clamped to lie in the
range 0.0 to 1.0 before it is used in the fogging equations described
below.
5.12.4
Fogging Equation
The fogging equation is:
C = fCi + (1-f)Cf
where:
C = outgoing fragment color
Cf = fog color
Ci = incoming fragment color
f = fog index
The equation is applied to the color components, red, green and blue;
alpha is not modified. The diagram below shows how the fogging would
typically affect a scene. Initially no fogging occurs, f >=1.0, then a region
of linear combination of the fragment color and fog color occurs 1.0 < f >
0.0, followed by a region of constant fog color, f <= 0.0.
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 ...