1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css"> 9<title>tf-tg-mtx</title> 10</head> 11 12<body> 13 14<h1 align="left">tf-tg-mtx</h1> 15 16<h2>Description</h2> 17<p><CODE>tf-tg-mtx</CODE> uses all default texture matrices to test texture coordinate generation. The following texture coordinate schemes are tested.<BR><BR>(Texture coordinates) * (Identity matrix)<BR>(Position coordinates) * (3x4 matrix) : Texture projection<BR>(Texture coordinates) * (2x4 matrix) : Texture transform<BR>(Normal vector) * (3x4 matrix) : Reflection mapping<BR><BR>The <CODE>GX_IDENTITY</CODE> matrix is always transforming the center cube for comparison. Since this would result in Q = 0 for projection and reflection mapping, the center cube is not rendered for those cases.</p> 18 19<p>It is important to note for the reflection mapping area, the normals of the cube have been bent outward to resemble those of a sphere. We would have used a sphere model except that it is very hard to tell when a reflection-mapped sphere is rotating.</p> 20 21<h2>Coverage</h2> 22<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 23 <tr> 24<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD> 25<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 26<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 27 </tr> 28 <tr> 29<TD width="30%" rowspan="3"><a href="../../../gx/Transform/GXLoadTexMtxImm.html"><CODE>GXLoadTexMtxImm</CODE></a></TD> 30<TD width="25%"><SPAN class="argument">Matrices</SPAN></TD> 31<TD width="45%">Provides different matrix for each cube.</TD> 32 </tr> 33 <tr> 34<TD width="25%"><SPAN class="argument">Matrix output destination</SPAN></TD> 35<TD width="45%"><CODE>GX_TEXMTX0</CODE> - <CODE>GX_TEXMTX9</CODE></TD> 36 </tr> 37 <tr> 38<TD width="25%"><SPAN class="argument">Matrix type</SPAN></TD> 39<TD width="45%"><CODE>GX_MTX2x4</CODE> or <CODE>GX_MTX3x4</CODE> depending on the type to generate.</TD> 40 </tr> 41 <tr> 42<TD width="30%" rowspan="4"><CODE><a href="../../../gx/TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</a></CODE></TD> 43<TD width="25%"><SPAN class="argument">Texture coordinate destination</SPAN></TD> 44<TD width="45%">Always <CODE>GX_TEXCOORD0</CODE>.</TD> 45 </tr> 46 <tr> 47<TD width="25%"><SPAN class="argument">Features used in texture coordinate generation</SPAN></TD> 48<TD width="45%"><CODE>GX_TG_MTX3x4</CODE> or <CODE>GX_TG_MTX2x4</CODE> depending on the type to generate.</TD> 49 </tr> 50 <tr> 51<TD width="25%"><SPAN class="argument">Original attributes used in texture coordinate generation</SPAN></TD> 52<TD width="45%"><CODE>GX_TG_TEX0</CODE>, <CODE>GX_TG_POS</CODE>, <CODE>GX_TG_NRM</CODE></TD> 53 </tr> 54 <tr> 55<TD width="25%"><SPAN class="argument">Matrix input source.</SPAN></TD> 56<TD width="45%"><CODE>GX_TEXMTX0</CODE>-<CODE>GX_TEXMTX9</CODE>, <CODE>GX_IDENTITY</CODE></TD> 57 </tr> 58</TABLE> 59 60<h2>Using the Demo</h2> 61<p>START exits the demo.</p> 62<p>The B Button stops/starts cube rotation.</p> 63<p>The X Button changes the texgen method.</p> 64 65<h2>Snapshot</h2> 66<p>No texgen. The texture coordinates are all transformed by an identity matrix.</p> 67<P><IMG src="./images/tf-tg-mtx-1.jpg" alt="tf-tg-mtx-1.jpg (13420 bytes)" WIDTH="400" HEIGHT="308"></p> 68 69<p>Projected texture.</p> 70<P><IMG src="./images/tf-tg-mtx-2.jpg" alt="tf-tg-mtx-2.jpg (11105 bytes)" WIDTH="400" HEIGHT="295"></p> 71 72<p>Texture transform.</p> 73<P><IMG src="./images/tf-tg-mtx-3.jpg" alt="tf-tg-mtx-3.jpg (14086 bytes)" WIDTH="400" HEIGHT="296"></p> 74 75<p>Reflection mapping.</p> 76<P><IMG src="./images/tf-tg-mtx-4.jpg" alt="tf-tg-mtx-4.jpg (11953 bytes)" WIDTH="400" HEIGHT="295"></p> 77 78<h2>Data Files Required</h2> 79<p><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTests/tf-02.tpl</CODE></p> 80 81<H2>Revision History</H2> 82<P> 832006/03/01 Initial version.<br> 84</P> 85 86<hr><p>CONFIDENTIAL</p></body> 87</html>