gDPSetCombineLERP

gDPSetCombineLERP [Macro]

Function

gDPSetCombineLERP

Sets the color combiner (CC) mode

Syntax

#include <ultra64.h>        /* gbi.h */
gDPSetCombineLERP(
        Gfx  *pkt,
        a0,  b0,  c0,  d0,
        Aa0, Ab0, Ac0, Ad0,
        a1,  b1,  c1,  d1,
        Aa1, Ab1, Ac1, Ad1)
gsDPSetCombineLERP(
        a0,  b0,  c0,  d0,
        Aa0, Ab0, Ac0, Ad0,
        a1,  b1,  c1,  d1,
        Aa1, Ab1, Ac1, Ad1)

Arguments

pkt
Display list pointer
a0, b0, c0, d0
Color input source for 1st cycle
Aa0, Ab0, Ac0, Ad0
Alpha input source for 1st cycle
a1, b1, c1, d1
Color input source for 2nd cycle
Aa1, Ab1, Ac1, Ad1
Alpha input source for 2nd cycle

Returned Value

None.

Description

This macro is used for setting details pertaining to the source input to the RDP's color combiner. Most of the standard input source is set in advance, but by including color constants and alpha constants, you can specify a unique CC mode. gDPSetCombineMode is a simplified version of this macro. Thus, the following two sets of syntax are the same:

(a) gsDPSetCombineMode(G_CC_MODULATE, G_CC_MODULATE)
(b) gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0,
      SHADE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, SHADE, 0)

For details, see gDPSetCombineMode as well as Section 12.6 "CC: Color Combiner" in the N64 Programming Manual.

Below are the color constants that can be used for the arguments a0, b0, c0, d0 and the arguments a1, b1, c1, d1:

COMBINED
Color combined from 1st cycle
TEXEL0
Texture color
TEXEL1
Texture color from tile+1
PRIMITIVE
Primitive color
SHADE
Shading color
ENVIRONMENT
Environment color
CENTER
Chroma key center value
SCALE
Chroma key scale value
COMBINED_ALPHA
Combined alpha from 1st cycle
TEXEL0_ALPHA
Texture alpha
TEXEL1_ALPHA
Texture alpha from tile+1
PRIMITIVE_ALPHA
Primitive alpha
SHADE_ALPHA
Shading alpha
ENV_ALPHA
Environment alpha
LOD_FRACTION
LOD coefficient
PRIM_LOD_FRAC
Primitive LOD coefficient
NOISE
Random noise
K4
Color conversion constant K4
K5
Color conversion constant K5
1
1.0
0
0.0

Below are the alpha constants that can be used for the arguments Aa0, Ab0, Ac0, Ad0 and the arguments Aa1, Ab1, Ac1, Ad1:

COMBINED
Combined alpha from 1 Cycle mode
TEXEL0
Texture alpha
TEXEL1
Texture alpha from tile+1
PRIMITIVE
Primitive alpha
SHADE
Shading alpha
ENVIRONMENT
Environment alpha
LOD_FRACTION
LOD coefficient
PRIM_LOD_FRAC
Primitive LOD coefficient
1
1.0
0
0.0

See Also

gDPSetCombineMode

Revision History

03/01/99 Newly created.