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>GXSetTevIndBumpST</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXSetTevIndBumpST</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17void GXSetTevIndBumpST( <A href="../Enumerated_Types/GXTevStageID.html">GXTevStageID</A> tev_stage, 18 <A href="../Enumerated_Types/GXIndTexStageID.html">GXIndTexStageID</A> ind_stage, 19 <A href="../Enumerated_Types/GXIndTexMtxID.html">GXIndTexMtxID</A> matrix_sel ); 20</pre></dd></dl> 21 22<H2>Arguments</H2> 23<TABLE class="arguments" border="1" > 24 <TBODY> 25 <TR> 26<TH>tev_stage</TH> 27<TD>TEV stage to be set. <BR>Applicable values are <code>GX_TEVSTAGE0</code>, <code>GX_TEVSTAGE1</code>, <code>GX_TEVSTAGE2</code>, ... , <code>GX_TEVSTAGE13</code>. This function sets three consecutive stages, so it cannot use <code>GX_TEVSTAGE14</code> and <code>GX_TEVSTAGE15</code>.</TD> 28 </TR> 29 <TR> 30<TH>ind_stage</TH> 31<TD>The indirect stage results used with this TEV stage. <BR>Accepted values are: <code>GX_INDTEXSTAGE0</code>, <code>GX_INDTEXSTAGE1</code>, <code>GX_INDTEXSTAGE2</code> and <code>GX_INDTEXSTAGE3</code>.</TD> 32 </TR> 33 <TR> 34<TH>matrix_sel</TH> 35<TD>Specifies the indirect scale value for offset multiplication. Accepted values are:<BR> 36 <TABLE class="arguments" border="1" > 37 <tr> 38<TD bgcolor="#C0C0C0">Name</TD> 39<TD bgcolor="#C0C0C0">Matrix Scale Value Used</TD> 40 </tr> 41 <tr> 42<TH>GX_ITM_0</TH> 43<TD>Matrix scale value 0.</TD> 44 </tr> 45 <tr> 46<TH>GX_ITM_1</TH> 47<TD>Matrix scale value 1.</TD> 48 </tr> 49 <tr> 50<TH>GX_ITM_2</TH> 51<TD>Matrix scale value 2.</TD> 52 </tr> 53 </TABLE> 54This function cannot use any indirect matrices. Matrix scale values can only be used together with dynamic S/T matrices.</TD> 55 </TR> 56 </TBODY> 57</TABLE> 58 59<H2>Return Values</H2> 60<P>None.</P> 61 62<H2>Description</H2> 63<P>This function sets an environment-mapped bump-mapped (EMBM) indirect lookup. The indirect map specifies offsets in the (S, T) coordinate space. This type of lookup requires three TEV stages to calculate. As a result of these calculations, a simple 2D bump map is properly oriented to the surface to which it is applied. Indirect maps are used to alter a normal-based texgen which is then used to look up an environment map. The environment map may be a simple light map, or a reflection map of the surrounding scenery.</P> 64<P>When using this function, texture lookups should be disabled for the first two TEV stages. The third stage is where the texture lookup is actually performed. The associated geometry must supply normal/binormal/tangent coordinates at each vertex. Appropriate texgens must supply each of these to the proper stages. (Binormals are first, tangents are second, and normals are third.) Even when not using static indirect matrices, it is necessary to select the matrix slot, and set the scale value used for this lookup.</P> 65<P>The following is an example for users wanting to learn more about this function.</P> 66<DL><DD><code>GXSetTevIndBumpST(GX_TEVSTAGE0, GX_INDTEXSTAGE0, GX_ITM_0);</code></DD></DL> 67<p>Performs the equivalent operations below:</p> 68<DL><DD><code>{<br> GXSetTevIndirect(<br> GX_TEVSTAGE0, // tev stage<br> GX_INDSTAGE0, // indirect stage<br> GX_ITF_8, // format<br> GX_ITB_ST, // bias<br> GX_ITM_S0, // matrix select (S matrix with scale 0)<br> GX_ITW_0, // wrap direct S<br> GX_ITW_0, // wrap direct T<br> FALSE, // add prev stage output?<br> FALSE, // use unmodified TC for LOD?<br> GX_ITBA_OFF // bump alpha select<br> );<br> GXSetTevIndirect(<br> GX_TEVSTAGE1, // tev stage<br> GX_INDSTAGE0, // indirect stage<br> GX_ITF_8, // format<br> GX_ITB_ST, // bias<br> GX_ITM_T0, // matrix select (T matrix with scale 0)<br> GX_ITW_0, // wrap direct S<br> GX_ITW_0, // wrap direct T<br> TRUE, // add prev stage output?<br> FALSE, // use unmodified TC for LOD?<br> GX_ITBA_OFF // bump alpha select<br> );<br> GXSetTevIndirect(<br> GX_TEVSTAGE2, // tev stage<br> GX_INDSTAGE0, // indirect stage<br> GX_ITF_8, // format<br> GX_ITB_NONE, // bias<br> GX_ITM_OFF, // matrix select<br> GX_ITW_OFF, // wrap direct S<br> GX_ITW_OFF, // wrap direct T<br> TRUE, // add prev stage output?<br> FALSE, // use unmodified TC for LOD?<br> GX_ITBA_OFF // bump alpha select<br> );<br> }</code></DD></DL> 69<P>The <A href="GXSetTevIndRepeat.html"><CODE>GXSetTevIndRepeat</CODE></A> function can be used in subsequent TEV stages to reuse the calculated texture coordinates for additional lookups.</P> 70 71<H2>See Also</H2> 72<P class="reference"> 73<A href="GXSetTevIndirect.html">GXSetTevIndirect</A>, 74<A href="GXSetTevIndRepeat.html">GXSetTevIndRepeat</A> 75</P> 76 77<H2>Revision History</H2> 78<P> 792006/03/01 Initial version.<br> 80</P> 81 82<hr><p>CONFIDENTIAL</p></body> 83</HTML>