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-tx-alpha</title>
10</head>
11
12<body>
13
14<h1 align="left">lit-tx-alpha</h1>
15
16<h2>Description</h2>
17
18<P>This program tests simple combinations of lighting and texture. There are two spotlights: one is used in a color channel and the other is used in an alpha channel. The alpha light makes textured panels opaque by using alpha blending.
19</P>
20
21<h2>Coverage</h2>
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%"><CODE>GX_COLOR0</CODE> / <CODE>GX_ALPHA0</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%">Always register source.</TD>
45    </tr>
46  <tr>
47<TD width="25%"><SPAN class="argument">Material color source</SPAN></TD>
48<TD width="45%">Always register source.</TD>
49    </tr>
50  <tr>
51<TD width="25%"><SPAN class="argument">Light mask</SPAN></TD>
52<TD width="45%"><CODE>GX_LIGHT0</CODE> for Color0 channel.<br> <CODE>GX_LIGHT1</CODE> for Alpha0 channel.</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 value.</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 value.</TD>
71    </tr>
72  <tr>
73<TD width="30%" rowspan="2"><a href="../../../gx/Tev/GXSetTevOp.html"><code>GXSetTevOp</code></a></TD>
74<TD width="25%"><SPAN class="argument">TEV stage ID</SPAN></TD>
75<TD width="45%">Always <CODE>GX_TEVSTAGE0</CODE>.</TD>
76    </tr>
77  <tr>
78<TD width="25%"><SPAN class="argument">Mode</SPAN></TD>
79<TD width="45%"><CODE>GX_MODULATE</CODE>, <CODE>GX_REPLACE</CODE></TD>
80    </tr>
81  <tr>
82<TD width="30%" rowspan="4"><a href="../../../gx/PixelProc/GXSetBlendMode.html"><code>GXSetBlendMode</code></a></TD>
83<TD width="25%"><SPAN class="argument">Types</SPAN></TD>
84<TD width="45%"><CODE>GX_BM_BLEND</CODE></TD>
85    </tr>
86  <tr>
87<TD width="25%"><SPAN class="argument">Input factor</SPAN></TD>
88<TD width="45%"><CODE>GX_BL_SRCALPHA</CODE></TD>
89    </tr>
90  <tr>
91<TD width="25%"><SPAN class="argument">Output factor</SPAN></TD>
92<TD width="45%"><CODE>GX_BL_INVSRCALPHA</CODE></TD>
93    </tr>
94  <tr>
95<TD width="25%"><SPAN class="argument">Logic calculations</SPAN></TD>
96<TD width="45%">N/A</TD>
97    </tr>
98</TABLE>
99
100<h2>Using the Demo</h2>
101<P>START exits the test. </P>
102<P>The A button changes the shape of the front panel.</P>
103<P>The B button selects a light (color light/alpha light). The selected light blinks. </P>
104<P>The Control Stick changes the direction of the selected light.</P>
105
106<h2>Snapshot</h2>
107<P>The lower left is the alpha light and upper right is the color (White) light.</P>
108<P><IMG src="./images/lit-tx-alpha.jpg" alt="lit-tx-alpha.jpg (35938 bytes)" width="640" height="480"></p>
109
110<h2>Required Data Files</h2>
111<p><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTextrs.tpl</CODE></p>
112
113<H2>Revision History</H2>
114<P>
1152006/03/01 Initial version.<br>
116</P>
117
118<hr><p>CONFIDENTIAL</p></body>
119</html>