Intel i86W Manual page 187

Table of Contents

Advertisement

PROGRAMMING EXAMPLES
Table 9-1. faddz Visualization
MERGE Register
Operands
63-32
31-0
I
I
I
63-48
47-32
31-16
15-0
fsrc1
-1.0
-3.0
fsrc2
3.0
3.0
fdest/fsrc1
2.0
0.0
2
I
I
0
I
fsrc2
1.0
1.0
fdest/fsrc1
3.0
1.0
3
I
2
I
1
I
0
fsrc2
3.0
3.0
fdest/fsrc1
6.0
4.0
6
I
I
4
I
fsrc2
1.0
1.0
fdest/fsrc1
7.0
5.0
7
I
6
I
5
I
4
fsrc2
3.0
3.0
fdest/fsrc1
10.0
8.0
10
I
I
8
I
fsrc2
1.0
1.0
fdest/fsrc1
11.0
9.0
11
I
10
I
9
I
8
fsrc2
3.0
3.0
fdest/fsrc1
14.0
12.0
14
I
I
12
I
fsrc2
1.0
1.0
frdest
15.0
11.0
15
~
14
I
13
I
12
Because the values of Z1 and mZ are constant for each loop through the rendering routine, the numbers
shown here are the values of the coefficient N, where the actual operands have the values Z1
+
N*mZ. For
each execution of faddz, fsrc1 is the same as fdest of the prior faddz. After every two faddz instructions, a
form instruction empties the MERGE register.
9.13.2 Color Interpolation
To determine the RGB color intensities at each pixel, the rendering routine interpolates
between the color intensities at the end points. (This rendering technique is called
"Gouraud shading" after H. Gouraud, "Continuous Shading of Curved Sufaces," IEEE
Transactions on Computers, C-20(6), June 1971, pp. 623-628.) Let the symbol C (color)
represent either R (red), G (green), or B (blue). Color interpolation consists of calcu-
lating the slope of C over the given line segment, then increasing the C values of each
9-25

Advertisement

Table of Contents
loading

Table of Contents