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<h2>Description</h2>
17<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>
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="5"><code><a href="../../../gx/Texture/GXInitTexObj.html">GXInitTexObj</a></code></TD>
28<TD width="25%"><SPAN class="argument">Pointer to image data.</SPAN></TD>
29<TD width="45%">Appropriate value.</TD>
30    </tr>
31  <tr>
32<TD width="25%"><SPAN class="argument">Width and height</SPAN></TD>
33<TD width="45%">Appropriate value.</TD>
34    </tr>
35  <tr>
36<TD width="25%"><SPAN class="argument">Texture Format</SPAN></TD>
37<TD width="45%"><strong><CODE>GX_TF_Z8</CODE></strong> / <strong><CODE>GX_TF_Z16</CODE></strong></TD>
38    </tr>
39  <tr>
40<TD width="25%"><SPAN class="argument">Clamp (S, T)</SPAN></TD>
41<TD width="45%"><CODE>GX_CLAMP</CODE> (N/A)</TD>
42    </tr>
43  <tr>
44<TD width="25%"><SPAN class="argument">Mipmap</SPAN></TD>
45<TD width="45%"><CODE>GX_DISABLE</CODE></TD>
46    </tr>
47  <tr>
48<TD width="30%" rowspan="5"><code><a href="../../../gx/Texture/GXInitTexObjLOD.html"><CODE>GXInitTexObjLOD</CODE></a></code></TD>
49<TD width="25%"><SPAN class="argument">min_filter</SPAN></TD>
50<TD width="45%"><CODE>GX_NEAR</CODE></TD>
51    </tr>
52  <tr>
53<TD width="25%"><SPAN class="argument">max_filter</SPAN></TD>
54<TD width="45%"><CODE>GX_NEAR</CODE></TD>
55    </tr>
56  <tr>
57<TD width="25%"><SPAN class="argument">min_lod, max_lod, lod_bias</SPAN></TD>
58<TD width="45%">0.0f, 0.0f, 0.0f&nbsp;&nbsp; (don't care)</TD>
59    </tr>
60  <tr>
61<TD width="25%"><SPAN class="argument">bias_clamp, do_edge_lod</SPAN></TD>
62<TD width="45%"><CODE>GX_DISABLE</CODE> (don't care)</TD>
63    </tr>
64  <tr>
65<TD width="25%"><SPAN class="argument"><STRONG><EM><CODE>max_aniso</CODE></EM></STRONG></SPAN></TD>
66<TD width="45%"><CODE>GX_ANISO_1</CODE></TD>
67    </tr>
68  <tr>
69<TD width="30%" rowspan="3"><code><a href="../../../gx/Tev/GXSetZTexture.html">GXSetZTexture</a></code></TD>
70<TD width="25%"><SPAN class="argument">Operations</SPAN></TD>
71<TD width="45%"><strong><CODE>GX_ZT_DISABLE</CODE></strong>, <strong><CODE>GX_ZT_REPLACE</CODE></strong>, <strong><CODE>GX_ZT_ADD</CODE></strong></TD>
72    </tr>
73  <tr>
74<TD width="25%"><SPAN class="argument">format</SPAN></TD>
75<TD width="45%"><strong><CODE>GX_TF_Z8</CODE></strong> / <strong><CODE>GX_TF_Z16</CODE></strong></TD>
76    </tr>
77  <tr>
78<TD width="25%"><SPAN class="argument">bias</SPAN></TD>
79<TD width="45%">some constant values</TD>
80    </tr>
81  <tr>
82<TD width="30%"><code><a href="../../../gx/PixelProc/GXSetZCompLoc.html"><CODE>GXSetZCompLoc</CODE></a></code></TD>
83<TD width="25%"><SPAN class="argument">before texture process</SPAN></TD>
84<TD width="45%"><CODE><font face="Courier New">GX_FALSE</font>.</CODE></TD>
85    </tr>
86  <tr>
87<TD width="30%" rowspan="5"><code><a href="../../../gx/Tev/GXSetAlphaCompare.html"><CODE>GXSetAlphaCompare</CODE></a></code></TD>
88<TD width="25%"><SPAN class="argument">comp0</SPAN></TD>
89<TD width="45%"><CODE>GX_GREATER</CODE></TD>
90    </tr>
91  <tr>
92<TD width="25%"><SPAN class="argument">ref0</SPAN></TD>
93<TD width="45%">Appropriate tolerance value.</TD>
94    </tr>
95  <tr>
96<TD width="25%"><SPAN class="argument">op</SPAN></TD>
97<TD width="45%"><CODE>GX_AOP_AND</CODE></TD>
98    </tr>
99  <tr>
100<TD width="25%"><SPAN class="argument">comp1</SPAN></TD>
101<TD width="45%"><CODE>GX_ALWAYS</CODE></TD>
102    </tr>
103  <tr>
104<TD width="25%"><SPAN class="argument">ref1</SPAN></TD>
105<TD width="45%">N/A</TD>
106    </tr>
107</TABLE>
108
109<h2>Using the Demo</h2>
110<P>The Menu button exits the demo.</P>
111<P>The L and R Buttons change the water level.<BR>The Control Stick moves selected tree sprite. X/Y Buttons select a tree.<BR>B Button cycles the Z texture setting in the following order.<BR>[Bias-On], [Bias-Off], [Replace], [Z texture off]</P>
112
113<h2>Snapshot</h2>
114<P><IMG src="./images/tev-ztex-0.jpg" alt="tev-ztex-0.jpg (86439 bytes)" WIDTH="640" HEIGHT="448"></p>
115
116<h2>Required Data Files</h2>
117<p><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTests/tev-04.tpl</CODE></p>
118
119<H2>Revision History</H2>
120<P>
1212006/03/01 Initial version.<br>
122</P>
123
124<hr><p>CONFIDENTIAL</p></body>
125</html>