#include <revolution/gx.h>void GXSetTevAlphaIn(
GXTevStageID stage,
GXTevAlphaArg a,
GXTevAlphaArg b,
GXTevAlphaArg c,
GXTevAlphaArg d );stage |
name of the stage Accepted values are: GX_TEVSTAGE0, GX_TEVSTAGE1, GX_TEVSTAGE2 through GX_TEVSTAGE15. |
||||||||||||||||||
a |
an input operand An unsigned 8-bit value for the component. Accepted values are:
|
||||||||||||||||||
b |
an input operand An unsigned 8-bit value for the element. Applicable values are as for a. |
||||||||||||||||||
c |
an input operand An unsigned 8-bit value for the element. Applicable values are as for a. |
||||||||||||||||||
d |
an input operand A signed 1-bit + 10-bit value for the element. Applicable values are as for a. |
None.
This function sets the input operands for one stage of the texture environment (TEV) alpha combiner unit. The input operands a, b and c are unsigned 8-bit inputs (0 <= a,b,c <= 255). The d input operand is a signed 10-bit input (-1024 <= d <= 1023).
Each TEV stage implements the following function:
reg = (d (op) ((1.0 - c)*a + c*b) + bias) * scale;
The operations described by op, bias and scale are programmable using the GXSetTevAlphaOp function.
The output of this stage is directed by default to the register GX_TEVPASS (see GXInit), but may be set explicitly by GXSetTevAlphaOp. When the input a, b or c is from a signed 10-bit number (either the results of a previous TEV stage or an input constant), only the 8 least-significant bits are used. The number is not converted; upper bits are simply discarded.
The registers used to store the output of TEV stages can also be used as inputs: GX_CA_A0, GX_CA_A1, GX_CA_A2 and GX_CA_APREV. These registers can be set with constant alpha values using GXSetTevColor or GXSetTevColorS10.
The input operand GX_CA_RASA is the solution for the per-vertex lighting equation. The input operand GX_CA_TEXA is the texture alpha input for this stage. You can select the colors and textures to which these inputs correspond using GXSetTevOrder.
GXSetTevOp
GXSetTevColorIn
GXSetTevAlphaOp
GXSetTevKAlphaSel
03/01/2006 Initial version.