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>tg-light-fx</title> 10</head> 11 12<body> 13 14<h1 align="left">tg-light-fx</h1> 15 16<h2>Description</h2> 17<p>This program performs some effects using texgen by vertex normals. There are three effects currently implemented. One is a cheap cartoon outline effect. The other two are textured specular highlight using two different types of texgen matrices.</p> 18 19<h2>Coverage</h2> 20<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 21 <tr> 22<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD> 23<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 24<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 25 </tr> 26 <tr> 27<TD width="30%" rowspan="3"><a href="../../../gx/Transform/GXLoadTexMtxImm.html"><code>GXLoadTexMtxImm</code></a></TD> 28<TD width="25%"><SPAN class="argument">Matrices</SPAN></TD> 29<TD width="45%">Appropriate projection matrix.</TD> 30 </tr> 31 <tr> 32<TD width="25%"><SPAN class="argument">Matrix destination.</SPAN></TD> 33<TD width="45%"><CODE>GX_TEXMTX0</CODE></TD> 34 </tr> 35 <tr> 36<TD width="25%"><SPAN class="argument">Types</SPAN></TD> 37<TD width="45%"><strong><CODE>GX_MTX2x4</CODE></strong></TD> 38 </tr> 39 <tr> 40<TD width="30%" rowspan="4"><a href="../../../gx/TexCoordGen/GXSetTexCoordGen.html"><code>GXSetTexCoordGen</code></a></TD> 41<TD width="25%"><SPAN class="argument">Destination coordinates.</SPAN></TD> 42<TD width="45%"><CODE><font face="Courier New">GX_TEXCOORD0</font>.</CODE></TD> 43 </tr> 44 <tr> 45<TD width="25%"><SPAN class="argument">Generation type.</SPAN></TD> 46<TD width="45%"><strong><CODE>GX_TG_MTX2x4</CODE></strong></TD> 47 </tr> 48 <tr> 49<TD width="25%"><SPAN class="argument">Generation source.</SPAN></TD> 50<TD width="45%"><strong><CODE>GX_TG_NRM</CODE></strong></TD> 51 </tr> 52 <tr> 53<TD width="25%"><SPAN class="argument">Matrix source.</SPAN></TD> 54<TD width="45%"><CODE>GX_TEXMTX0</CODE></TD> 55 </tr> 56 <tr> 57<TD width="30%" rowspan="5"><a href="../../../gx/Texture/GXInitTexObj.html"><code>GXInitTexObj</code></a></TD> 58<TD width="25%"><SPAN class="argument">Image pointer.</SPAN></TD> 59<TD width="45%">Appropriate value.</TD> 60 </tr> 61 <tr> 62<TD width="25%"><SPAN class="argument">Width and height</SPAN></TD> 63<TD width="45%">Appropriate value.</TD> 64 </tr> 65 <tr> 66<TD width="25%"><SPAN class="argument">format</SPAN></TD> 67<TD width="45%"><CODE>GX_TF_IA8</CODE>, <CODE>GX_TF_IA4</CODE></TD> 68 </tr> 69 <tr> 70<TD width="25%"><SPAN class="argument">Wrap mode (s, t).</SPAN></TD> 71<TD width="45%">Always <CODE>GX_CLAMP</CODE>.</TD> 72 </tr> 73 <tr> 74<TD width="25%"><SPAN class="argument">Mipmap</SPAN></TD> 75<TD width="45%">Always <CODE>GX_FALSE</CODE>.</TD> 76 </tr> 77 <tr> 78<TD width="30%"><a href="../../../gx/Texture/GXLoadTexObj.html"><code><CODE>GXLoadTexObj</CODE></code></a></TD> 79<TD width="25%"><SPAN class="argument">Destination texture name.</SPAN></TD> 80<TD width="45%"><CODE>GX_TEXMAP0</CODE></TD> 81 </tr> 82 <tr> 83<TD width="30%" rowspan="2"><a href="../../../gx/Tev/GXSetTevOp.html"><code>GXSetTevOp</code></a></TD> 84<TD width="25%"><SPAN class="argument">TEV stage ID.</SPAN></TD> 85<TD width="45%">Always <CODE>GX_TEVSTAGE0</CODE>.</TD> 86 </tr> 87 <tr> 88<TD width="25%"><SPAN class="argument">Operation mode</SPAN></TD> 89<TD width="45%">Always <CODE>GX_DECAL</CODE>.</TD> 90 </tr> 91</TABLE> 92 93<h2>Using the Demo</h2> 94<p>START exits the test.</p> 95<p>The Control Stick moves the light position.<br>The C Stick rotates the object.<br></p> 96<p>The A Button changes the effect mode.</p> 97 98<p>The B Button hides the light direction mark.</p> 99 100<p>The L/R buttons tune parameters for the current effect.</p> 101 102<h2>Snap Shots</h2> 103<p>Cheap cartoon outline.</p> 104<P><IMG src="./images/tg-light-fx-0.jpg" alt="tg-light-fx-0.jpg (6022 bytes)" width="320" height="240"></p> 105 106<p>Specular highlight by 1D texgen.</p> 107<P><IMG src="./images/tg-light-fx-1.jpg" alt="tg-light-fx-1.jpg (7491 bytes)" width="320" height="240"></p> 108 109<p>Specular highlight by 2D texgen.</p> 110<P><IMG src="./images/tg-light-fx-2.jpg" alt="tg-light-fx-2.jpg (6747 bytes)" width="320" height="240"></p> 111 112<h2>Data Files Required</h2> 113<p>None.</p> 114 115<H2>Revision History</H2> 116<P> 1172006/03/01 Initial version.<br> 118</P> 119 120<hr><p>CONFIDENTIAL</p></body> 121</html>