#include <revolution/gx.h>
void GXSetTevColorIn(
GXTevStageID stage,
GXTevColorArg a,
GXTevColorArg b,
GXTevColorArg c,
GXTevColorArg d );
stage |
The TEV stage name. Accepted values are: GX_TEVSTAGE0, GX_TEVSTAGE1, GX_TEVSTAGE2 through GX_TEVSTAGE15. |
||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a |
Input color operand. An unsigned 8-bit value for the component. Accepted values are:
|
||||||||||||||||||||||||||||||||||
b |
Input color operand. An unsigned 8-bit value for the component. Applicable values are the same as for a. | ||||||||||||||||||||||||||||||||||
| c | Input color operand. An unsigned 8-bit value for the component. Applicable values are the same as for a. | ||||||||||||||||||||||||||||||||||
| d | Input color operand. A component-specific 1-bit sign + 10 bits. Applicable values are the same as for a. |
None.
This function sets the input operands for the texture environment (TEV) color combiner unit. The input operands a, b and c are RGB colors where each component is an unsigned 8-bit value (0 <= a, b, c <= 255). The d input operand is an RGB color where each component is a signed 10-bit input (-1024 <= d <= 1023).
In cases where the input operand is an alpha value (GX_CC_A0, GX_CC_A1, GX_CC_A2, GX_CC_APREV, GX_CC_TEXA, GX_CC_RASA), the alpha value is replicated across the three color channels (R=A, G=A, B=A).
The function implemented by this TEV stage is set with the GXSetTevColorOp function.
The output of this stage is directed by default to the GX_TEVPREV register (see the GXInit function), but may be set explicitly with the GXSetTevColorOp function.
The registers used to store the output of TEV stages can also be used as the GX_CC_C0, GX_CC_C1, GX_CC_C2 and GX_CC_CPREV inputs. You can program these registers with constant color values using GXSetTevColor or GXSetTevColorS10. Each register can store either an unsigned 8-bit number or a signed 10-bit number per component (RGB). If a signed 10-bit number is selected for the inputs a, b or c, it is truncated to 8 bits. No conversion is performed and the highest bits are discarded.
The input operands GX_CC_RASC and GX_CC_RASA are the result of per-vertex lighting equations. The input operands GX_CC_TEXC and GX_CC_TEXA are the texture inputs for this stage.
The GXSetTevOrder function associates a TEV stage with particular colors and textures.
GXSetTevOp, GXSetTevColorOp, GXSetTevAlphaIn, GXSetTevSwapMode, GXSetTevKColorSel
2006/03/01 Initial version.
CONFIDENTIAL