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>tev-ztex</title> 10</head> 11 12<body> 13 14<h1 align="left">tev-ztex</h1> 15 16 17 18<h2>Description</h2> 19 20<p>This program shows an example usage of Z texture. Every object in the scene (except water surface) is drawn as 2D sprites by using static textures. However, these sprites also contain depth offset information (Z texture), so a type of 3D effect can be produced (for example, intersections of terrain and water surface). In this demo, Z textures are also prepared as static data.</p> 21 22<h2>Coverage</h2> 23<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 24 <tr> 25<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Function</STRONG></EM></TD> 26<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 27<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 28 </tr> 29 <tr> 30<TD width="30%" rowspan="5"><code><a href="../../../gx/Texture/GXInitTexObj.html">GXInitTexObj</a></code></TD> 31<TD width="25%">Pointer to image data.</TD> 32<TD width="45%">Appropriate value.</TD> 33 </tr> 34 <tr> 35<TD width="25%">Width and height</TD> 36<TD width="45%">Appropriate value.</TD> 37 </tr> 38 <tr> 39<TD width="25%">Texture Format</TD> 40<TD width="45%"><FONT face="Courier New">GX_TF_Z8</FONT> / <FONT face="Courier New">GX_TF_Z16</FONT></TD> 41 </tr> 42 <tr> 43<TD width="25%">clamp_s, clamp_t</TD> 44<TD width="45%"><FONT face="Courier New">GX_CLAMP</FONT> (N/A)</TD> 45 </tr> 46 <tr> 47<TD width="25%">Mipmap</TD> 48<TD width="45%"><FONT face="Courier New">GX_DISABLE</FONT></TD> 49 </tr> 50 <tr> 51<TD width="30%" rowspan="5"><code><a href="../../../gx/Texture/GXInitTexObjLOD.html">GXInitTexObjLOD</a></code></TD> 52<TD width="25%">min_filter</TD> 53<TD width="45%"><FONT face="Courier New">GX_NEAR</FONT></TD> 54 </tr> 55 <tr> 56<TD width="25%">max_filter</TD> 57<TD width="45%">GX_NEAR</TD> 58 </tr> 59 <tr> 60<TD width="25%">min_lod, max_lod, lod_bias</TD> 61<TD width="45%">0.0f, 0.0f, 0.0f (don't care)</TD> 62 </tr> 63 <tr> 64<TD width="25%">bias_clamp, do_edge_lod</TD> 65<TD width="45%"><FONT face="Courier New">GX_DISABLE</FONT> (don't care)</TD> 66 </tr> 67 <tr> 68<TD width="25%">max_aniso</TD> 69<TD width="45%"><FONT face="Courier New">GX_ANISO_1</FONT></TD> 70 </tr> 71 <tr> 72<TD width="30%" rowspan="3"><code><a href="../../../gx/Tev/GXSetTevColorIn.html">GXSetZTexture</a></code></TD> 73<TD width="25%">operation</TD> 74<TD width="45%"><FONT face="Courier New">GX_ZT_DISABLE</FONT>, <FONT face="Courier New">GX_ZT_REPLACE</FONT>, <FONT face="Courier New">GX_ZT_ADD</FONT></TD> 75 </tr> 76 <tr> 77<TD width="25%">Format</TD> 78<TD width="45%"><FONT face="Courier New">GX_TF_Z8</FONT> / <FONT face="Courier New">GX_TF_Z16</FONT></TD> 79 </tr> 80 <tr> 81<TD width="25%">bias</TD> 82<TD width="45%">some constant values</TD> 83 </tr> 84 <tr> 85<TD width="30%"><code><a href="../../../gx/PixelProc/GXSetZCompLoc.html">GXSetZCompLoc</a></code></TD> 86<TD width="25%">before texture process</TD> 87<TD width="45%"><FONT face="Courier New">GX_FALSE</FONT></TD> 88 </tr> 89 <tr> 90<TD width="30%" rowspan="5"><code><a href="../../../gx/Tev/GXSetAlphaCompare.html">GXSetAlphaCompare</a></code></TD> 91<TD width="25%">comp0</TD> 92<TD width="45%"><FONT face="Courier New">GX_GREATER</FONT></TD> 93 </tr> 94 <tr> 95<TD width="25%">ref0 </TD> 96<TD width="45%">Appropriate tolerance value.</TD> 97 </tr> 98 <tr> 99<TD width="25%">op</TD> 100<TD width="45%"><FONT face="Courier New">GX_AOP_AND</FONT></TD> 101 </tr> 102 <tr> 103<TD width="25%">comp1</TD> 104<TD width="45%"><FONT face="Courier New">GX_ALWAYS</FONT></TD> 105 </tr> 106 <tr> 107<TD width="25%">ref1</TD> 108<TD width="45%">N/A</TD> 109 </tr> 110</TABLE> 111<h2>Operation Method</h2> 112<P>The Menu button exits the demo.</P> 113<P>The L and R Buttons change the water level. The Control Stick moves selected tree sprite. X/Y Buttons select a tree. B Button cycles the Z texture setting in the following order. [Bias-On], [Bias-Off], [Replace], [Z texture off]</P> 114<h2>Snapshot</h2> 115 116<P><IMG src="./images/tev-ztex-0.jpg" alt="tev-ztex-0.jpg (86439 bytes)" WIDTH="640" HEIGHT="448"></p> 117 118<h2>Required Data Files</h2> 119 120<p><FONT face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTests/tev-04.tpl</FONT></p> 121<H2>Revision History</H2> 122<P>2006/03/01 Initial version.</P> 123<hr> 124<P>CONFIDENTIAL</p> 125</BODY> 126</HTML>