1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>GXSetTevColorIn</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXSetTevColorIn</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17void GXSetTevColorIn( 18 <A href="../Enumerated_Types/GXTevStageID.html">GXTevStageID</A> stage, 19 <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A> a, 20 <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A> b, 21 <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A> c, 22 <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A> d ); 23</pre></dd></dl> 24 25<H2>Arguments</H2> 26<TABLE class="arguments" border="1" > 27 <TBODY> 28 <TR> 29<TH><STRONG><EM><CODE>stage</CODE></EM></STRONG></TH> 30<TD>The TEV stage name. Accepted values are: <code>GX_TEVSTAGE0</code>, <code>GX_TEVSTAGE1</code>, <code>GX_TEVSTAGE2</code> through <code>GX_TEVSTAGE15</code>.</TD> 31 </TR> 32 <TR> 33<TH><A name="a"><STRONG><EM><CODE>a</CODE></EM></STRONG></A></TH> 34<TD>Input color <A href="../Enumerated_Types/GXTevColorArg.html">operand</A>. An unsigned 8-bit value for the component. Accepted values are:<BR> 35 <TABLE class="arguments" border="1" > 36 <tr> 37<TD bgcolor="#C0C0C0">Name</TD> 38<TD bgcolor="#C0C0C0">Input</TD> 39 </tr> 40 <tr> 41<TH>GX_CC_C0</TH> 42<TD>RGB color from the <CODE>TEVREG0</CODE> register.</TD> 43 </tr> 44 <tr> 45<TH>GX_CC_C1</TH> 46<TD>RGB color from the <CODE>TEVREG1</CODE> register.</TD> 47 </tr> 48 <tr> 49<TH>GX_CC_C2</TH> 50<TD>RGB color from the <CODE>TEVREG2</CODE> register.</TD> 51 </tr> 52 <tr> 53<TH>GX_CC_CPREV</TH> 54<TD>RGB color from the <CODE>TEVPREV</CODE> register.</TD> 55 </tr> 56 <tr> 57<TH>GX_CC_A0</TH> 58<TD>Alpha from the <CODE>TEVREG0</CODE> register.</TD> 59 </tr> 60 <tr> 61<TH>GX_CC_A1</TH> 62<TD>Alpha from the <CODE>TEVREG1</CODE> register.</TD> 63 </tr> 64 <tr> 65<TH>GX_CC_A2</TH> 66<TD>Alpha from the <CODE>TEVREG2</CODE> register.</TD> 67 </tr> 68 <tr> 69<TH>GX_CC_APREV</TH> 70<TD>Alpha from the <CODE>TEVPREV</CODE> register.</TD> 71 </tr> 72 <tr> 73<TH>GX_CC_TEXC</TH> 74<TD>RGB color from the texture.</TD> 75 </tr> 76 <tr> 77<TH>GX_CC_TEXA</TH> 78<TD>Alpha from the texture</TD> 79 </tr> 80 <tr> 81<TH>GX_CC_RASC</TH> 82<TD>RGB color from the rasterized vertex color.</TD> 83 </tr> 84 <tr> 85<TH>GX_CC_RASA</TH> 86<TD>Alpha from the rasterized vertex color</TD> 87 </tr> 88 <tr> 89<TH>GX_CC_ONE</TH> 90<TD>1.0 fixed</TD> 91 </tr> 92 <tr> 93<TH>GX_CC_HALF</TH> 94<TD>0.5 fixed</TD> 95 </tr> 96 <tr> 97<TH>GX_CC_ZERO</TH> 98<TD>0.0 fixed</TD> 99 </tr> 100 <tr> 101<TH>GX_CC_KONST</TH> 102<TD>Constant color input (see the <A href="GXSetTevKColorSel.html"><CODE>GXSetTevKColorSel</CODE></A> function)</TD> 103 </tr> 104 </TABLE> 105 </TD> 106 </TR> 107 <TR> 108<TH><em><strong><code>b</code></strong></em> </TH> 109<TD>Input color <A href="../Enumerated_Types/GXTevColorArg.html">operand</A>. An unsigned 8-bit value for the component. Applicable values are the same as for <SPAN class="argument">a</SPAN>.</TD> 110 </TR> 111 <TR> 112<TH>c</TH> 113<TD>Input color <A href="../Enumerated_Types/GXTevColorArg.html">operand</A>. An unsigned 8-bit value for the component. Applicable values are the same as for <SPAN class="argument">a</SPAN>.</TD> 114 </TR> 115 <TR> 116<TH>d</TH> 117<TD>Input color <A href="../Enumerated_Types/GXTevColorArg.html">operand</A>. A component-specific 1-bit sign + 10 bits. Applicable values are the same as for <SPAN class="argument">a</SPAN>.</TD> 118 </TR> 119 </TBODY> 120</TABLE> 121 122<H2>Return Values</H2> 123<P>None.</P> 124 125<H2>Description</H2> 126<P>This function sets the input operands for the texture environment (TEV) color combiner unit. The input operands <SPAN class="argument">a</SPAN>, <SPAN class="argument">b</SPAN> and <SPAN class="argument">c</SPAN> are RGB colors where each component is an unsigned 8-bit value (0 <= <SPAN class="argument">a, b, c</SPAN> <= 255). The <SPAN class="argument">d</SPAN> input operand is an RGB color where each component is a signed 10-bit input (-1024 <= <SPAN class="argument">d</SPAN> <= 1023).</P> 127<P>In cases where the input operand is an alpha value (<CODE>GX_CC_A0</CODE>, <CODE>GX_CC_A1</CODE>, <CODE>GX_CC_A2</CODE>, <CODE>GX_CC_APREV</CODE>, <CODE>GX_CC_TEXA</CODE>, <CODE>GX_CC_RASA</CODE>), the alpha value is replicated across the three color channels (<CODE>R=A</CODE>, <CODE>G=A</CODE>, <CODE>B=A</CODE>).</P> 128<P>The function implemented by this TEV stage is set with the <A href="GXSetTevColorOp.html"><CODE>GXSetTevColorOp</CODE></A> function.</P> 129<P>The output of this stage is directed by default to the <CODE>GX_TEVPREV</CODE> register (see the <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function), but may be set explicitly with the <A href="GXSetTevColorOp.html"><CODE>GXSetTevColorOp</CODE></A> function.</P> 130<P>The registers used to store the output of TEV stages can also be used as the <CODE>GX_CC_C0</CODE>, <CODE>GX_CC_C1</CODE>, <CODE>GX_CC_C2</CODE> and <CODE>GX_CC_CPREV</CODE> inputs. You can program these registers with constant color values using <code><a href="GXSetTevColor.html">GXSetTevColor</a></code> or <a href="GXSetTevColorS10.html"><code>GXSetTevColorS10</code></a>. 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 <SPAN class="argument">a</SPAN>, <SPAN class="argument">b</SPAN> or <SPAN class="argument">c</SPAN>, it is truncated to 8 bits. No conversion is performed and the highest bits are discarded.</P> 131<P>The input operands <CODE>GX_CC_RASC</CODE> and <CODE>GX_CC_RASA</CODE> are the result of <A href="../list.html#Lighting">per-vertex lighting</A> equations. The input operands <CODE>GX_CC_TEXC</CODE> and <CODE>GX_CC_TEXA</CODE> are the texture inputs for this stage.</P> 132<P>The <A href="GXSetTevOrder.html"><CODE>GXSetTevOrder</CODE></A> function associates a TEV stage with particular colors and textures.</P> 133 134<H2>See Also</H2> 135<P class="reference"> 136<A href="GXSetTevOp.html">GXSetTevOp</A>, 137<A href="GXSetTevColorOp.html">GXSetTevColorOp</A>, 138<A href="GXSetTevAlphaIn.html">GXSetTevAlphaIn</A>, 139<A href="GXSetTevSwapMode.html">GXSetTevSwapMode</A>, 140<A href="GXSetTevKColorSel.html">GXSetTevKColorSel</A> 141</P> 142 143<H2>Revision History</H2> 144<P> 1452006/03/01 Initial version.<BR> 146</P> 147 148<hr><p>CONFIDENTIAL</p></body> 149</HTML>