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
17
18<h2>Description</h2>
19
20<p><CODE>tf-tg-mtx</CODE> uses all default texture matrices to test texture coordinate generation. The following texture coordinate schemes are tested. (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 drawn for those cases.</p>
21
22<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>
23
24<h2>Coverage</h2>
25<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
26  <tr>
27<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Function</STRONG></EM></TD>
28<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD>
29<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD>
30    </tr>
31  <tr>
32<TD width="30%" rowspan="3"><a href="../../../gx/Transform/GXLoadTexMtxImm.html"><FONT face="Courier New">GXLoadTexMtxImm</FONT></a></TD>
33<TD width="25%">Matrices</TD>
34<TD width="45%">different matrix sent down for each cube</TD>
35    </tr>
36  <tr>
37<TD width="25%">matrix destination</TD>
38<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT> - <FONT face="Courier New">GX_TEXMTX9</FONT></TD>
39    </tr>
40  <tr>
41<TD width="25%">Matrix type</TD>
42<TD width="45%"><CODE>GX_MTX2x4</CODE> or <CODE>GX_MTX3x4</CODE> depeneding on generation type.</TD>
43    </tr>
44  <tr>
45<TD width="30%" rowspan="4"><FONT face="Courier New"><a href="../../../gx/TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</a></FONT>&nbsp;&nbsp;</TD>
46<TD width="25%">Destination coordinates.</TD>
47<TD width="45%">Always <FONT face="Courier New">GX_TEXCOORD0</FONT>.</TD>
48    </tr>
49  <tr>
50<TD width="25%">texgen type</TD>
51<TD width="45%"><CODE>GX_TG_MTX3x4</CODE> or <CODE>GX_TG_MTX2x4</CODE> depending on generation type.</TD>
52    </tr>
53  <tr>
54<TD width="25%">texgen src</TD>
55<TD width="45%"><FONT face="Courier New">GX_TG_TEX0</FONT>, <FONT face="Courier New">GX_TG_POS</FONT>, <FONT face="Courier New">GX_TG_NRM</FONT></TD>
56    </tr>
57  <tr>
58<TD width="25%">Matrix input source.</TD>
59<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT>-<FONT face="Courier New">GX_TEXMTX9</FONT>, <FONT face="Courier New">GX_IDENTITY</FONT></TD>
60    </tr>
61</TABLE>
62<h2>Operation Method</h2>
63
64<p>START exits the demo.</p>
65
66<p>The B Button stops/starts cube rotation.</p>
67
68<p>The X Button changes the texgen method.</p>
69
70<h2>Snapshot</h2>
71
72<p>No texgen. The texture coordinates are all transformed by an identity matrix.</p>
73
74<P><IMG src="./images/tf-tg-mtx-1.jpg" alt="tf-tg-mtx-1.jpg (13420 bytes)" WIDTH="400" HEIGHT="308"></p>
75
76<p>Projected texture.</p>
77
78<P><IMG src="./images/tf-tg-mtx-2.jpg" alt="tf-tg-mtx-2.jpg (11105 bytes)" WIDTH="400" HEIGHT="295"></p>
79
80<p>Texture transform.</p>
81
82<P><IMG src="./images/tf-tg-mtx-3.jpg" alt="tf-tg-mtx-3.jpg (14086 bytes)" WIDTH="400" HEIGHT="296"></p>
83
84<p>Reflection mapping.</p>
85
86<P><IMG src="./images/tf-tg-mtx-4.jpg" alt="tf-tg-mtx-4.jpg (11953 bytes)" WIDTH="400" HEIGHT="295"></p>
87
88<h2>Data Files Required</h2>
89
90<p><FONT face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTests/tf-02.tpl</FONT></p>
91<H2>Revision History</H2>
92<P>03/01/2006 Initial version.</P>
93</body>
94</html>