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-emboss</title> 10</head> 11 12<body> 13 14<h1 align="left">tg-emboss</h1> 15 16<h2>Description</h2> 17 18<p><CODE>tg-emboss</CODE> shows a simple emboss-style bump mapping (without material texture in this test).</p> 19 20<p>This sample demo generates an image in a single pass with 2 TEV stages. If you use material texture, 3 tev stages are necessary.</p> 21 22<h2>Coverage</h2> 23 24<p><big>For Real hardware</big></p> 25<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 26 <tr> 27<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD> 28<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 29<TD bgcolor="#C0C0C0" colspan="2"><EM><STRONG>Description</STRONG></EM></TD> 30 </tr> 31 <tr> 32<TD width="30%" rowspan="2"><a href="../../../gx/Geometry/GXSetVtxDesc.html"><FONT face="Courier New">GXSetVtxDesc</FONT></a></TD> 33<TD width="25%">Attributes</TD> 34<TD colspan="2">GX_VA_NBT / GX_VA_TEX0</TD> 35 </tr> 36 <tr> 37<TD width="25%">Types</TD> 38<TD colspan="2"><FONT face="Courier New">GX_DIRECT</FONT></TD> 39 </tr> 40 <tr> 41<TD width="30%" rowspan="4"><a href="../../../gx/TexCoordGen/GXSetTexCoordGen.html"><FONT face="Courier New">GXSetTexCoordGen</FONT></a></TD> 42<TD width="25%">destination coord</TD> 43<TD><FONT face="Courier New">GX_TEXCOORD0</FONT></TD> 44<TD><FONT face="Courier New">GX_TEXCOORD1</FONT></TD> 45 </tr> 46 <tr> 47<TD width="25%">texgen type</TD> 48<TD><FONT face="Courier New">GX_TG_MTX2x4</FONT></TD> 49<TD><FONT face="Courier New">GX_TG_BUMP0</FONT></TD> 50 </tr> 51 <tr> 52<TD width="25%">texgen src</TD> 53<TD><FONT face="Courier New">GX_TG_TEX0</FONT></TD> 54<TD><FONT face="Courier New">GX_TG_TEXCOORD0</FONT></TD> 55 </tr> 56 <tr> 57<TD width="25%">mtx src</TD> 58<TD><FONT face="Courier New">GX_IDENTITY</FONT></TD> 59<TD><FONT face="Courier New">GX_IDENTITY</FONT></TD> 60 </tr> 61 <tr> 62<TD width="30%" rowspan="4"><a href="../../../gx/Tev/GXSetTevOrder.html"><FONT face="Courier New">GXSetTevOrder</FONT></a></TD> 63<TD width="25%">tev stage</TD> 64<TD><FONT face="Courier New">GX_TEVSTAGE0</FONT></TD> 65<TD><FONT face="Courier New">GX_TEVSTAGE1</FONT></TD> 66 </tr> 67 <tr> 68<TD width="25%">texgen type</TD> 69<TD><FONT face="Courier New">GX_TEXCOORD0</FONT></TD> 70<TD><FONT face="Courier New">GX_TEXCOORD1</FONT></TD> 71 </tr> 72 <tr> 73<TD width="25%">texgen src</TD> 74<TD><FONT face="Courier New">GX_TEXMAP0</FONT></TD> 75<TD><FONT face="Courier New">GX_TEXMAP1</FONT></TD> 76 </tr> 77 <tr> 78<TD width="25%">mtx src</TD> 79<TD><FONT face="Courier New">GX_COLOR0A0</FONT></TD> 80<TD><FONT face="Courier New">GX_COLOR_NULL</FONT></TD> 81 </tr> 82 <tr> 83<TD width="30%" rowspan="2"><a href="../../../gx/Tev/GXSetTevColor.html"><FONT face="Courier New"><CODE>GXSetTevColor</CODE></FONT></a></TD> 84<TD width="25%">tev register ID</TD> 85<TD colspan="2"><FONT face="Courier New">GX_TEVREG0</FONT></TD> 86 </tr> 87 <tr> 88<TD width="25%">tev register color</TD> 89<TD colspan="2">{ 0, 0, 0, <em>bumpScale</em> }<br> <em>bumpScale</em> can be changed interactively</TD> 90 </tr> 91 <tr> 92<TD width="30%" rowspan="5"><a href="../../../gx/Tev/GXSetTevColorIn.html"><FONT face="Courier New">GXSetTevColorIn</FONT></a></TD> 93<TD width="25%">tev stage</TD> 94<TD><FONT face="Courier New">GX_TEVSTAGE0</FONT></TD> 95<TD><FONT face="Courier New">GX_TEVSTAGE1</FONT></TD> 96 </tr> 97 <tr> 98<TD width="25%">tev color arg A</TD> 99<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 100<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 101 </tr> 102 <tr> 103<TD width="25%">tev color arg B</TD> 104<TD><FONT face="Courier New">GX_TC_TEXC</FONT></TD> 105<TD><FONT face="Courier New">GX_TC_TEXC</FONT></TD> 106 </tr> 107 <tr> 108<TD width="25%">tev color arg C</TD> 109<TD><FONT face="Courier New">GX_CC_A0</FONT></TD> 110<TD><FONT face="Courier New">GX_CC_A0</FONT></TD> 111 </tr> 112 <tr> 113<TD width="25%">tev color arg D</TD> 114<TD><FONT face="Courier New">GX_CC_RASC</FONT></TD> 115<TD><FONT face="Courier New">GX_CC_CPREV</FONT></TD> 116 </tr> 117 <tr> 118<TD width="30%" rowspan="6"><a href="../../../gx/Tev/GXSetTevColorOp.html"><FONT face="Courier New"><CODE>GXSetTevColorOp</CODE></FONT></a></TD> 119<TD width="25%">tev stage</TD> 120<TD><FONT face="Courier New">GX_TEVSTAGE0</FONT></TD> 121<TD><FONT face="Courier New">GX_TEVSTAGE1</FONT></TD> 122 </tr> 123 <tr> 124<TD width="25%">TEV operation</TD> 125<TD><FONT face="Courier New">GX_TEV_ADD</FONT></TD> 126<TD><FONT face="Courier New">GX_TEV_SUB</FONT></TD> 127 </tr> 128 <tr> 129<TD width="25%">tev bias</TD> 130<TD><FONT face="Courier New">GX_TB_ZERO</FONT></TD> 131<TD><FONT face="Courier New">GX_TB_ZERO</FONT></TD> 132 </tr> 133 <tr> 134<TD width="25%">tev scale</TD> 135<TD><FONT face="Courier New">GX_CS_SCALE_1</FONT></TD> 136<TD><FONT face="Courier New">GX_CS_SCALE_1</FONT></TD> 137 </tr> 138 <tr> 139<TD width="25%">tev clamp</TD> 140<TD><FONT face="Courier New">GX_ENABLE</FONT></TD> 141<TD><FONT face="Courier New">GX_ENABLE</FONT></TD> 142 </tr> 143 <tr> 144<TD width="25%">tev output</TD> 145<TD><FONT face="Courier New">GX_TEVPREV</FONT></TD> 146<TD><FONT face="Courier New">GX_TEVPREV</FONT></TD> 147 </tr> 148 <tr> 149<TD width="30%" rowspan="5"><a href="../../../gx/Tev/GXSetTevAlphaIn.html"><FONT face="Courier New"><CODE>GXSetTevAlphaIn</CODE></FONT></a></TD> 150<TD width="25%">tev stage</TD> 151<TD><FONT face="Courier New">GX_TEVSTAGE0</FONT></TD> 152<TD><FONT face="Courier New">GX_TEVSTAGE1</FONT></TD> 153 </tr> 154 <tr> 155<TD width="25%">tev alpha arg A</TD> 156<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 157<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 158 </tr> 159 <tr> 160<TD width="25%">tev alpha arg B</TD> 161<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 162<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 163 </tr> 164 <tr> 165<TD width="25%">tev alpha arg C</TD> 166<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 167<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 168 </tr> 169 <tr> 170<TD width="25%">tev alpha arg D</TD> 171<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 172<TD><FONT face="Courier New">GX_CC_ZERO</FONT></TD> 173 </tr> 174 <tr> 175<TD width="30%" rowspan="6"><a href="../../../gx/Tev/GXSetTevAlphaOp.html"><FONT face="Courier New"><CODE>GXSetTevAlphaOp</CODE></FONT></a></TD> 176<TD width="25%">tev stage</TD> 177<TD><FONT face="Courier New">GX_TEVSTAGE0</FONT></TD> 178<TD><FONT face="Courier New">GX_TEVSTAGE1</FONT></TD> 179 </tr> 180 <tr> 181<TD width="25%">TEV operation</TD> 182<TD><FONT face="Courier New">GX_TEV_ADD</FONT></TD> 183<TD><FONT face="Courier New">GX_TEV_ADD</FONT></TD> 184 </tr> 185 <tr> 186<TD width="25%">tev bias</TD> 187<TD><FONT face="Courier New">GX_TB_ZERO</FONT></TD> 188<TD><FONT face="Courier New">GX_TB_ZERO</FONT></TD> 189 </tr> 190 <tr> 191<TD width="25%">tev scale</TD> 192<TD><FONT face="Courier New">GX_CS_SCALE_1</FONT></TD> 193<TD><FONT face="Courier New">GX_CS_SCALE_1</FONT></TD> 194 </tr> 195 <tr> 196<TD width="25%">tev clamp</TD> 197<TD><FONT face="Courier New">GX_DISABLE</FONT></TD> 198<TD><FONT face="Courier New">GX_DISABLE</FONT></TD> 199 </tr> 200 <tr> 201<TD width="25%">tev output</TD> 202<TD><FONT face="Courier New">GX_TEVPREV</FONT></TD> 203<TD><FONT face="Courier New">GX_TEVPREV</FONT></TD> 204 </tr> 205 <tr> 206<TD width="30%"><a href="../../../gx/Draw/GXDrawCube.html"><FONT face="Courier New">GXDrawCube</FONT></a></TD> 207<TD width="25%"><FONT face="Courier New">void</FONT></TD> 208<TD colspan="2">Generate binormal / texture coord 0 also</TD> 209 </tr> 210</TABLE> 211<h2>Operation Method</h2> 212 213<p>The Menu button exits the test.</p> 214 215<p>X Button moves cursor up.<br>B Button moves cursor down.</p> 216 217<p>A Button changes parameter on the cursor.</p> 218 219<p>Joy stick moves light position indicated a red rectangle.</p> 220 221<h2>Snapshot</h2> 222 223<p>Light position is the top left on the screen..</p> 224 225<P><IMG src="./images/tg-emboss-1.gif" alt="tg-emboss-1.gif (31637 bytes)" width="642" height="482"></p> 226 227<p>Light position is the bottom left on the screen..</p> 228 229<P><IMG src="./images/tg-emboss-2.gif" alt="tg-emboss-2.gif (39548 bytes)" width="642" height="482"></p> 230 231<p>Light position is the bottom left on the screen..</p> 232 233<P><IMG src="./images/tg-emboss-3.gif" alt="tg-emboss-3.gif (38121 bytes)" width="642" height="482"></p> 234 235<p>Light position is the top right on the screen..</p> 236 237<P><IMG src="./images/tg-emboss-4.gif" alt="tg-emboss-4.gif (39123 bytes)" width="642" height="482"></p> 238 239<h2>Data Files Required</h2> 240 241<p><FONT face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTests/tg-02.tpl</FONT></p> 242<H2>Revision History</H2> 243<P>2006/03/01 Initial version.</P> 244<hr> 245<P>CONFIDENTIAL</p> 246</BODY> 247</HTML>