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-prelit</title>
10</head>
11
12<body>
13
14<h1 align="left">lit-prelit</h1>
15
16<h2>Description</h2>
17<P>This program performs a prelighting test. In this test, the software calculates the prelit color for each vertex. The prelit color functions as the ambient color of the RGB color channel when the color of hardware lights is added.</P>
18
19<h2>Coverage</h2>
20<p>This program also tests any combination of material/ambient source settings.
21</p>
22<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
23  <tr>
24<TD width="30%" bgcolor="#C0C0C0"><em><strong>Functions</strong></em></TD>
25<TD width="25%" bgcolor="#C0C0C0"><em><strong>Parameters</strong></em></TD>
26<TD width="45%" bgcolor="#C0C0C0"><em><strong>Description</strong></em></TD>
27    </tr>
28  <tr>
29<TD width="30%"><a href="../../../gx/Lighting/GXInitLightDir.html"><code>GXInitLightDir</code></a></TD>
30<TD width="25%"><SPAN class="argument">Light direction (nx, ny, nz)</SPAN></TD>
31<TD width="45%">Various values.</TD>
32    </tr>
33  <tr>
34<TD width="30%" rowspan="7"><a href="../../../gx/Lighting/GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></TD>
35<TD width="25%"><SPAN class="argument">Color channel ID</SPAN></TD>
36<TD width="45%">Always <CODE>GX_COLOR0</CODE>.</TD>
37    </tr>
38  <tr>
39<TD width="25%"><SPAN class="argument">Channel enable</SPAN></TD>
40<TD width="45%">Always <CODE>GX_ENABLE</CODE>.</TD>
41    </tr>
42  <tr>
43<TD width="25%"><SPAN class="argument">Ambient color source</SPAN></TD>
44<TD width="45%"><strong><CODE>GX_SRC_VTX</CODE></strong> / <strong><CODE>GX_SRC_REG</CODE></strong></TD>
45    </tr>
46  <tr>
47<TD width="25%"><SPAN class="argument">Material color source</SPAN></TD>
48<TD width="45%"><CODE><strong>GX_SRC_VTX</strong></CODE> / <CODE><strong>GX_SRC_REG</strong></CODE></TD>
49    </tr>
50  <tr>
51<TD width="25%"><SPAN class="argument">Light mask</SPAN></TD>
52<TD width="45%">All lights always enabled.</TD>
53    </tr>
54  <tr>
55<TD width="25%"><SPAN class="argument">Diffusion function</SPAN></TD>
56<TD width="45%">Always <CODE>GX_DF_CLAMP</CODE>.</TD>
57    </tr>
58  <tr>
59<TD width="25%"><SPAN class="argument">Attenuation function</SPAN></TD>
60<TD width="45%">Always <CODE>GX_AF_SPOT</CODE>.</TD>
61    </tr>
62  <tr>
63<TD width="30%"><a href="../../../gx/Lighting/GXSetChanAmbColor.html"><code>GXSetChanAmbColor</code></a></TD>
64<TD width="25%"><SPAN class="argument">Ambient color</SPAN></TD>
65<TD width="45%">Only one color.</TD>
66    </tr>
67  <tr>
68<TD width="30%"><a href="../../../gx/Lighting/GXSetChanMatColor.html"><code>GXSetChanMatColor</code></a></TD>
69<TD width="25%"><SPAN class="argument">Material color</SPAN></TD>
70<TD width="45%">Only one color.</TD>
71    </tr>
72</TABLE>
73
74<h2>Using the Demo</h2>
75<P>START exits the test.</P>
76<P>The A button changes the material/ambient source settings. Four combination patterns are shown in turn.</P>
77
78<h2>Snapshot</h2>
79<p>Prelit color is not used. Both material and ambient sources are registers.</p>
80<P><IMG src="./images/lit-prelit-0.jpg" alt="lit-prelit-0.jpg (3203 bytes)" width="320" height="240"></p>
81
82<p>Prelit color is used as ambient. Material source is register. </p>
83<P><IMG src="./images/lit-prelit-1.jpg" alt="lit-prelit-1.jpg (4767 bytes)" width="320" height="240"></P>
84
85<p>Prelit color is used as material. Ambient source is register. </p>
86<P><IMG src="./images/lit-prelit-2.jpg" alt="lit-prelit-2.jpg (3195 bytes)" width="320" height="240"></P>
87
88<p>Prelit color is used as both material and ambient.</p>
89<P><IMG src="./images/lit-prelit-3.jpg" alt="lit-prelit-3.jpg (4262 bytes)" width="320" height="240"></P>
90
91<h2>Required Data Files</h2>
92<p>None.</p>
93
94<H2>Revision History</H2>
95<P>
962006/03/01 Initial version.<br>
97</P>
98
99<hr><p>CONFIDENTIAL</p></body>
100</html>