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>lit-atn-func</title>
10</head>
11
12<body>
13
14<h1 align="left">lit-atn-func</h1>
15
16<h2>Description</h2>
17<P>This program tests two convenient light attenuation functions. There are two subtests in this program: angular attenuation mode and distance attenuation mode.
18</P>
19
20<h2>Coverage</h2>
21<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
22  <tr>
23<TD width="30%" bgcolor="#C0C0C0"><em><strong>Functions</strong></em></TD>
24<TD width="25%" bgcolor="#C0C0C0"><em><strong>Parameters</strong></em></TD>
25<TD width="45%" bgcolor="#C0C0C0"><em><strong>Description</strong></em></TD>
26    </tr>
27  <tr>
28<TD width="30%" rowspan="2"><a href="../../../gx/Lighting/GXInitLightSpot.html"><code>GXInitLightSpot</code></a></TD>
29<TD width="25%"><SPAN class="argument">Cutoff angle</SPAN></TD>
30<TD width="45%">Various values.</TD>
31    </tr>
32  <tr>
33<TD width="25%"><SPAN class="argument">Spot function</SPAN></TD>
34<TD width="45%"><CODE><strong>GX_SP_OFF</strong></CODE>, <CODE><strong>GX_SP_FLAT</strong></CODE>, <CODE><strong>GX_SP_COS</strong></CODE>, <CODE><strong>GX_SP_COS2</strong></CODE>, <CODE><strong>GX_SP_SHARP</strong></CODE>, <CODE><strong>GX_SP_RING1</strong></CODE>, <CODE><strong>GX_SP_RING2</strong></CODE>.</TD>
35    </tr>
36  <tr>
37<TD width="30%" rowspan="3"><a href="../../../gx/Lighting/GXInitLightDistAttn.html"><code>GXInitLightDistAttn</code></a></TD>
38<TD width="25%"><SPAN class="argument">Light reference distance</SPAN></TD>
39<TD width="45%">Always <CODE>GX_TEVSTAGE0</CODE>.</TD>
40    </tr>
41  <tr>
42<TD width="25%"><SPAN class="argument">Reference brightness</SPAN></TD>
43<TD width="45%"><CODE>GX_MODULATE, GX_REPLACE</CODE></TD>
44    </tr>
45  <tr>
46<TD width="25%"><SPAN class="argument">Distance Attenuation Function</SPAN></TD>
47<TD width="45%"><CODE><strong>GX_DA_OFF</strong></CODE>, <CODE><strong>GX_DA_GENTLE</strong></CODE>, <CODE><strong>GX_DA_MEDIUM</strong></CODE>, <CODE><strong>GX_DA_STEEP</strong></CODE>.</TD>
48    </tr>
49  <tr>
50<TD width="30%" rowspan="7"><a href="../../../gx/Lighting/GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></TD>
51<TD width="25%"><SPAN class="argument">Color channel ID</SPAN></TD>
52<TD width="45%">Always <CODE>GX_COLOR0</CODE>.</TD>
53    </tr>
54  <tr>
55<TD width="25%"><SPAN class="argument">Channel enable</SPAN></TD>
56<TD width="45%">Always <CODE>GX_ENABLE</CODE>.</TD>
57    </tr>
58  <tr>
59<TD width="25%"><SPAN class="argument">Ambient color source</SPAN></TD>
60<TD width="45%">Always register source.</TD>
61    </tr>
62  <tr>
63<TD width="25%"><SPAN class="argument">Material color source</SPAN></TD>
64<TD width="45%">Always register source.</TD>
65    </tr>
66  <tr>
67<TD width="25%"><SPAN class="argument">Light mask</SPAN></TD>
68<TD width="45%"><CODE>GX_LIGHT0</CODE> for Color0 channel.<br> <CODE>GX_LIGHT1</CODE> for Alpha0 channel.</TD>
69    </tr>
70  <tr>
71<TD width="25%"><SPAN class="argument">Diffusion function</SPAN></TD>
72<TD width="45%"><STRONG>Always</STRONG> <CODE>GX_DF_CLAMP</CODE>.</TD>
73    </tr>
74  <tr>
75<TD width="25%"><SPAN class="argument">Attenuation function</SPAN></TD>
76<TD width="45%">Always <CODE>GX_AF_SPOT</CODE>.</TD>
77    </tr>
78  <tr>
79<TD width="30%"><a href="../../../gx/Lighting/GXSetChanAmbColor.html"><code>GXSetChanAmbColor</code></a></TD>
80<TD width="25%"><SPAN class="argument">Ambient color</SPAN></TD>
81<TD width="45%">Only one value.</TD>
82    </tr>
83  <tr>
84<TD width="30%"><a href="../../../gx/Lighting/GXSetChanMatColor.html"><code>GXSetChanMatColor</code></a></TD>
85<TD width="25%"><SPAN class="argument">Material color</SPAN></TD>
86<TD width="45%">Only one value.</TD>
87    </tr>
88  <tr>
89<TD width="30%" rowspan="2"><a href="../../../gx/Tev/GXSetTevOp.html"><code>GXSetTevOp</code></a></TD>
90<TD width="25%"><SPAN class="argument">TEV stage ID</SPAN></TD>
91<TD width="45%">Always <CODE>GX_TEVSTAGE0</CODE>.</TD>
92    </tr>
93  <tr>
94<TD width="25%"><SPAN class="argument">Mode</SPAN></TD>
95<TD width="45%">Always <CODE>GX_MODULATE</CODE>.</TD>
96    </tr>
97</TABLE>
98
99<h2>Using the Demo</h2>
100<P>START exits the test.</P>
101<P>The B button toggles between the angular and distance tests.
102</P>
103<p>&nbsp;&nbsp;&nbsp; <u><strong>Angular (Spot) Attenuation Test</strong></u></p>
104<BLOCKQUOTE>The X and Y buttons change the spot function type.<BR>The Controller Stick (left/right) changes the cutoff angle.
105</BLOCKQUOTE>
106
107<p>&nbsp;&nbsp;&nbsp; <u><strong>Distance Attenuation Test</strong></u></p>
108<BLOCKQUOTE>The X and Y buttons change the distance attenuation function type.<BR>The Control Stick (left/right) changes the reference distance.<BR>The Control Stick (up/down) changes the reference brightness.
109</BLOCKQUOTE>
110
111<h2>Snapshot</h2>
112<table border="0" width="55%" cellspacing="0" cellpadding="0">
113  <tr>
114<td width="22%">Angular: <CODE>GX_SP_FLAT</CODE>.</td>
115<td width="21%">Angular: <CODE>GX_SP_COS2</CODE>.</td>
116  </tr>
117  <tr>
118    <td width="22%" align="center">
119<img src="./images/lit-atn-func-1.jpg" alt="lit-atn-func-1.jpg (7903 bytes)" width="320" height="240"></td>
120    <td width="21%">
121<img src="./images/lit-atn-func-3.jpg" alt="lit-atn-func-3.jpg (6237 bytes)" width="320" height="240"></td>
122  </tr>
123  <tr>
124    <td width="22%" align="center"></td>
125    <td width="21%"></td>
126  </tr>
127  <tr>
128<TD width="22%">Distance attenuation: <CODE>GX_DA_GENTLE</CODE>.</td>
129<td width="21%">Distance attenuation: <CODE>GX_DA_STEEP</CODE>.</td>
130  </tr>
131  <tr>
132    <td width="22%" align="center">
133<img src="./images/lit-atn-func-8.jpg" alt="lit-atn-func-8.jpg (3679 bytes)" width="320" height="240"></td>
134    <td width="21%">
135<img src="./images/lit-atn-func-10.jpg" alt="lit-atn-func-10.jpg (4022 bytes)" width="320" height="240"></td>
136  </tr>
137</table>
138
139<h2>Required Data Files</h2>
140<p><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTests/lit-10.tpl</CODE></p>
141
142<H2>Revision History</H2>
143<P>
1442006/03/01 Initial version.<br>
145</P>
146
147<hr><p>CONFIDENTIAL</p></body>
148</html>