Return to previous page Return to menu Go to next page

5.3 Gouraud shading table

This table specifies 4 points of RGB data when Gouraud shading is applied to parts. Since 4 points of data are 16 bits each, one table needs 8 bytes. Place it at the position starting from the 8HByte boundary address. However, do not write to 00000H to 0001FH.
* VRAM is up to 7FFFFH. Do not define a Gouraud shading table beyond address 80000H.
The table defines RGB data in the order of vertex (A), (B), (C), (D). For lines, only vertices A and B are valid and correspond to the start and end points of the line. For sprites, vertices (A), (B), (C), and (D) correspond to upper left, upper right, lower right, and lower left.
This table is referenced from the command table when Gouraud shading is specified.

Table 5.2 Guro shading table
 table address 
 corresponding vertex 
 Sprite, Polygon, Polyline 
 Line 
 Table start address 
 Vertex (A) 
 Line start point 
 Table start address + 2 
 Vertex (B) 
 line End point 
 Table start address + 4 
 Vertex (C) 
 Ignore 
 Table start address + 6 
 Vertex (D) 
 Ignore 

Figure 5.4 RGB code format

Gouraud shading
Gouraud shading can be applied to parts drawn in RGB code. Gouraud shading is used to specify the amount of change in the brightness of each RGB to be changed in the Gouraud shading table. Valid only for RGB color code.
¡Color is not guaranteed if Gouraud shading is specified for the color code of the color bank code.

Specify Gouraud shading
When performing Gouraud shading, specify Gouraud shading with the color calculation bit. The color calculation bit is the start address of the command table


Return to previous page Return to menu Go to next page