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>GXSetTevIndBumpXYZ</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXSetTevIndBumpXYZ</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17void GXSetTevIndBumpXYZ( <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. Accepted values are: <CODE>GX_TEVSTAGE0</CODE>, <CODE>GX_TEVSTAGE1</CODE>, <CODE>GX_TEVSTAGE2</CODE>, ... , <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 offset and the indirect matrix and scale value for multiplication. Accepted values are:<BR> 36 <TABLE class="arguments" border="1" > 37 <TBODY> 38 <TR> 39<TD bgcolor="#C0C0C0">Name</TD> 40<TD bgcolor="#C0C0C0">Indirect Matrix and Scale Value Used</TD> 41 </TR> 42 <TR> 43<TH>GX_ITM_0</TH> 44<TD>Indirect matrix 0 and matrix scale value 0.</TD> 45 </TR> 46 <TR> 47<TH>GX_ITM_1</TH> 48<TD>Indirect matrix 1 and matrix scale value 1.</TD> 49 </TR> 50 <TR> 51<TH>GX_ITM_2</TH> 52<TD>Indirect matrix 2 and matrix scale value 2.</TD> 53 </TR> 54 </TBODY> 55 </TABLE> 56 </TD> 57 </TR> 58 </TBODY> 59</TABLE> 60 61<H2>Return Values</H2> 62<P>None.</P> 63 64<H2>Description</H2> 65<P>This function sets up an environment-mapped and bump-mapped indirect lookup. The indirect map specifies offsets in object (X, Y, Z) space. This kind of lookup requires only one TEV stage to calculate. However, the bump map (indirect map) is geometry-specific. Thus there is a space/calculation tradeoff between using this function and using the <A href="GXSetTevIndBumpST.html"><CODE>GXSetTevIndBumpST</CODE></A> function.</P> 66<P>The indirect matrix must be loaded with a transformation for normals from object space to texture space (similar to visible space, but with a possibly inverted Y axis). The surface geometry need only provide regular normals at each vertex. A normal-based texgen must be set up for regular texture coordinates.</P> 67<P><B>Note:</B> In fact, it is possible to perform this kind of bump mapping without providing vertex normals. Doing so requires centering the environment map around (0, 0) (wrapping below 0) instead of around the texture map's center. Also, the bump map must be loaded with actual normals instead of normal offsets. Regular texture coordinates must not be used. This can be done with a position-based texgen and a zero matrix. It is also possible to use the <CODE>GXSetTevIndirect</CODE> function (in place of the <CODE>GXSetTevIndBumpXYZ</CODE> function) and wrap the regular texture coordinates to zero.</P> 68<p>The following is an example for users wanting to learn more about this function.</p> 69<DL><DD><code>GXSetTevIndBumpXYZ(GX_TEVSTAGE0, GX_INDTEXSTAGE0, GX_ITM_0);</code></DD></DL> 70<p>Performs the equivalent operations below:</p> 71<DL><DD><code>{<br> GXSetTevIndirect(<br> GX_TEVSTAGE0, // tev stage<br> GX_INDSTAGE0, // indirect stage<br> GX_ITF_8, // format<br> GX_ITB_STU, // bias<br> GX_ITM_0, // matrix select (matrix 0 with scale 0)<br> GX_ITW_OFF, // wrap direct S<br> GX_ITW_OFF, // 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> }<br></code></DD></DL> 72 73<H2>See Also</H2> 74<P class="reference"> 75<A href="GXSetTevIndirect.html">GXSetTevIndirect</A> 76</P> 77 78<H2>Revision History</H2> 79<P> 802006/03/01 Initial version.<br> 81</P> 82 83<hr><p>CONFIDENTIAL</p></body> 84</HTML>