Q&A- CC (Color Combiner)

QA1 How do I set the primitive color when the light source has been calculated?
QA2 What is a "texel 1 color"?
QA3 I want to add the colors of the front character and the background graphic...
QA4 What is the input source to the color combiner for lighting colors?
QA5 Can there be both texture and fog for translucent and missing objects?


Q1 Since the same area is used for the vertex color information and normal information in the current library, I can't use vertex color information with the primitive color information when the light source has been calculated. How do I set the primitive color when the light source has been calculated?

A1 The primitive color information specifies the primitive color register of the CC inside the DP, so specify the primitive color and shade color in the combine mode so that they are combined (multiplied). Typically, the combine mode which combines the primitive and color can be defined in /usr/include/PR/gbi.h or in the application with

#define (mode name) PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0

the primitive color can be set with

g*DPSetPrimColor()

and combination can be realized with

g*DPSetCombineMode()

top


Q2 What is a "texel 1 color" in the color combiner input source?

A2 This refers to the color of the second tile when two tiles have been prepared in the texture memory.

top


Q3 I want to combine the color of the front character and the background graphic, but I can't seem to be able to do it well using the color combiner. What should I be using as the input source?

A3 In this case, you would use the blender and not the combiner. For details, refer to the section about the blender in Chapter 15. Set the Render mode as follows:

gsDPSetRenderMode(G_RM_ADD,G_RM_ADD2)

Please also note that it is also easy for the level of the ADD~ opn p256 to drop.

top


Q4 What is the input source to the color combiner for lighting colors when lighting is performed?

A4 It is in the "shade color". When lighting is not used, the shade color is used for shading of the vertex colors.

top


Q5 Can there be both texture and fog for translucent and missing objects? How do I obtain fog effects while performing translucent processing on the texture which is spread on a polygon?

A5 Of course it is possible. However, since the fog function uses the alpha shading channel, please be aware that there will be unexpected results if the alpha combiner input source is "SHADE" (see gbi.h). As an example, typical color combiner settings for when utilizing a missing texture and fog are given below.

gsDPSetCombineMode(G_CC_DECALRGBA,G_CC_PASS2)
gsDPSetCombineMode(G_CC_MODULATERGBDECALA,G_CC_PASS2)

top