1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css">
7<TITLE>tg-shadow2</TITLE>
8</HEAD>
9<BODY>
10<H1 align="left">tg-shadow2</H1>
11
12<H2>Description</H2>
13<P>This program shows an example of complicated full-scene shadow generation. This method uses object IDs to determine which parts should become shadow. (For details, see the <a href="#Algorithm Details">Algorithm Details</a> section.))</P>
14<H2>Coverage</H2>
15<P>This list doesn't contain settings for drawing other than full-scene shadows.</P>
16<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
17  <TBODY>
18    <TR>
19<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD>
20<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD>
21<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD>
22    </TR>
23    <TR>
24<TD width="30%" rowspan="3"><A href="../../../gx/Transform/GXLoadTexMtxImm.html"><CODE>GXLoadTexMtxImm</CODE></A></TD>
25<TD width="25%">Matrices</TD>
26<TD width="45%">appropriate projection mtx</TD>
27    </TR>
28    <TR>
29<TD width="25%">matrix destination</TD>
30<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT></TD>
31    </TR>
32    <TR>
33<TD width="25%">Types</TD>
34<TD width="45%"><STRONG><FONT face="Courier New">GX_MTX3x4</FONT></STRONG></TD>
35    </TR>
36    <TR>
37<TD width="30%"><A href="../../../gx/TexCoordGen/GXSetNumTexGens.html"><CODE>GXSetNumTexGens</CODE></A></TD>
38<TD width="25%">number of texgens</TD>
39      <TD width="45%">1</TD>
40    </TR>
41    <TR>
42<TD width="30%" rowspan="4"><A href="../../../gx/TexCoordGen/GXSetTexCoordGen.html"><CODE>GXSetTexCoordGen</CODE></A></TD>
43<TD width="25%">destination coord</TD>
44<TD width="45%"><FONT face="Courier New">GX_TEXCOORD0</FONT></TD>
45    </TR>
46    <TR>
47<TD width="25%">texgen type</TD>
48<TD width="45%"><STRONG><FONT face="Courier New">GX_TG_MTX3x4</FONT></STRONG></TD>
49    </TR>
50    <TR>
51<TD width="25%">texgen src</TD>
52<TD width="45%"><STRONG><FONT face="Courier New">GX_TG_POS</FONT></STRONG></TD>
53    </TR>
54    <TR>
55<TD width="25%">mtx src</TD>
56<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT></TD>
57    </TR>
58    <TR>
59<TD width="30%" rowspan="5"><A href="../../../gx/Texture/GXInitTexObj.html"><CODE>GXInitTexObj</CODE></A></TD>
60<TD width="25%">Pointer to image data.</TD>
61<TD width="45%">Appropriate.</TD>
62    </TR>
63    <TR>
64<TD width="25%">width / height</TD>
65<TD width="45%">some constant values</TD>
66    </TR>
67    <TR>
68<TD width="25%">Format</TD>
69<TD width="45%"><FONT face="Courier New">GX_TF_RGBA8</FONT></TD>
70    </TR>
71    <TR>
72<TD width="25%">wrap mode(s, t)</TD>
73<TD width="45%"><FONT face="Courier New">GX_CLAMP</FONT></TD>
74    </TR>
75    <TR>
76<TD width="25%">mipmap</TD>
77<TD width="45%">Always <CODE>GX_FALSE</CODE>.</TD>
78    </TR>
79    <TR>
80<TD width="30%"><A href="../../../gx/Texture/GXLoadTexObj.html"><CODE>GXLoadTexObj</CODE></A></TD>
81<TD width="25%">Destination texture name.</TD>
82<TD width="45%"><FONT face="Courier New">GX_TEXMAP0</FONT></TD>
83    </TR>
84    <TR>
85<TD width="30%"><A href="../../../gx/Texture/GXInvalidateTexAll.html"><CODE>GXInvalidateTexAll</CODE></A></TD>
86<TD width="25%">(no parameter)</TD>
87      <TD width="45%"> </TD>
88    </TR>
89    <TR>
90<TD width="30%"><A href="../../../gx/Framebuffer/GXSetTexCopySrc.html"><CODE>GXSetTexCopySrc</CODE></A></TD>
91<TD width="25%">top / left / width / height</TD>
92<TD width="45%">some constant values</TD>
93    </TR>
94    <TR>
95<TD width="30%" rowspan="3"><A href="../../../gx/Framebuffer/GXSetTexCopyDst.html"><CODE>GXSetTexCopyDst</CODE></A></TD>
96<TD width="25%">width / height</TD>
97<TD width="45%">some constant values</TD>
98    </TR>
99    <TR>
100<TD width="25%">Format</TD>
101<TD width="45%"><FONT face="Courier New">GX_TF_RGBA8</FONT></TD>
102    </TR>
103    <TR>
104<TD width="25%">mipmap filter</TD>
105<TD width="45%"><FONT face="Courier New">GX_FALSE</FONT></TD>
106    </TR>
107    <TR>
108<TD width="30%" rowspan="2"><A href="../../../gx/Framebuffer/GXCopyTex.html"><CODE>GXCopyTex</CODE></A></TD>
109<TD width="25%">Pointer to image data.</TD>
110<TD width="45%">Appropriate.</TD>
111    </TR>
112    <TR>
113<TD width="25%">clear operation</TD>
114<TD width="45%"><FONT face="Courier New">GX_TRUE</FONT></TD>
115    </TR>
116    <TR>
117<TD width="30%"><A href="../../../gx/Tev/GXSetNumTevStages.html"><CODE>GXSetNumTevStages</CODE></A></TD>
118<TD width="25%">number of TEV stages</TD>
119      <TD width="45%">2</TD>
120    </TR>
121    <TR>
122<TD width="30%"><A href="../../../gx/Tev/GXSetTevOrder.html"><CODE>GXSetTevOrder</CODE></A></TD>
123<TD width="25%">each argument</TD>
124<TD width="45%"><A href="#Algorithm Details">see algorithm details</A></TD>
125    </TR>
126    <TR>
127<TD width="30%"><CODE><A href="../../../gx/Tev/GXSetTevColorIn.html">GXSetTevColorIn</A></CODE></TD>
128<TD width="25%">each argument</TD>
129<TD width="45%"><A href="#Algorithm Details">see algorithm details</A></TD>
130    </TR>
131    <TR>
132<TD width="30%"><CODE><A href="../../../gx/Tev/GXSetTevColorOp.html">GXSetTevColorOp</A></CODE></TD>
133<TD width="25%">each argument</TD>
134<TD width="45%"><A href="#Algorithm Details">see algorithm details</A></TD>
135    </TR>
136    <TR>
137<TD width="25%">clamp mode</TD>
138<TD width="45%"><strong>GX_TC_EQ</strong>(stage0), GX_TC_LINEAR(stage1)<br> <a href="#Algorithm Details">see algorithm details</a></TD>
139    </TR>
140    <TR>
141<TD width="30%" rowspan="2"><CODE><A href="../../../gx/Tev/GXSetTevColor.html">GXSetTevColor</A></CODE></TD>
142<TD width="25%">tev color register</TD>
143<TD width="45%"><FONT face="Courier New">GX_TEVREG0</FONT></TD>
144    </TR>
145    <TR>
146<TD width="25%">color value</TD>
147<TD width="45%">Appropriate.</TD>
148    </TR>
149    <TR>
150<TD width="30%"><A href="../../../gx/Management/GXPixModeSync.html"><CODE>GXPixModeSync</CODE></A></TD>
151<TD width="25%">(no parameter)</TD>
152      <TD width="45%"> </TD>
153    </TR>
154  </TBODY>
155</TABLE>
156<H2>Operation Method</H2>
157<P>The Menu button exits the test.</P>
158<P>The main stick moves camera position.<br>The sub stick moves light position.</P>
159<P>The A button changes display modes.<br>The B button switches the shadow projection type (perspective/orthographic).<br>The X button toggles the model size adjustment ON/OFF.<br>The Y button changes the size of shadow map.</P>
160<H2>Snapshot</H2>
161<P><IMG src="./images/tg-shadow2-00.jpg" alt="tg-shadow2-00.jpg (29082 bytes)" width="640" height="480"></P>
162<H2>Required Data Files</H2>
163<P>None.</P>
164<H2><A name="Algorithm Details">Algorithm Details</A></H2>
165<P>See Section &quot;7.2 ID-Based Full-Scene Shadow Mapping&quot; in &quot;Graphics Library [Application Edition].&quot;</P>
166<H2>Revision History</H2>
167<P>2006/03/01 Initial version.</P>
168<hr>
169<P>CONFIDENTIAL</p>
170</BODY>
171</HTML>