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
17
18<h2>Description</h2>
19
20<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.
21</P>
22<h2>Coverage</h2>
23<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
24  <tr>
25<TD width="30%" bgcolor="#C0C0C0"><em><strong>Functions</strong></em></TD>
26<TD width="25%" bgcolor="#C0C0C0"><em><strong>Parameters</strong></em></TD>
27<TD width="45%" bgcolor="#C0C0C0"><em><strong>Description</strong></em></TD>
28    </tr>
29  <tr>
30<TD width="30%"><a href="../../../gx/Lighting/GXInitLightDir.html"><code>GXInitLightDir</code></a></TD>
31<TD width="25%"><font face="Courier New"><em><strong>Light direction (nx, ny, nz)</strong></em></font></TD>
32<TD width="45%">Various values.</TD>
33    </tr>
34  <tr>
35<TD width="30%" rowspan="7"><a href="../../../gx/Lighting/GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></TD>
36<TD width="25%"><font face="Courier New"><em><strong>Color channel ID</strong></em></font></TD>
37<TD width="45%"><font face="Courier New">GX_COLOR0</font> / <font face="Courier New">GX_ALPHA0</font>.</TD>
38    </tr>
39  <tr>
40<TD width="25%"><font face="Courier New"><em><strong>Channel enable</strong></em></font></TD>
41<TD width="45%"><font face="Courier New">Always <font face="Courier New">GX_ENABLE</font>.</font></TD>
42    </tr>
43  <tr>
44<TD width="25%"><font face="Courier New"><em><strong>Ambient color source</strong></em></font></TD>
45<TD width="45%">Always register source.</TD>
46    </tr>
47  <tr>
48<TD width="25%"><font face="Courier New"><em><strong>Material color source</strong></em></font></TD>
49<TD width="45%">Always register source.</TD>
50    </tr>
51  <tr>
52<TD width="25%"><font face="Courier New"><em><strong>Light mask</strong></em></font></TD>
53<TD width="45%"><font face="Courier New">GX_LIGHT0</font> for Color0 channel.<br> <font face="Courier New">GX_LIGHT1</font> for Alpha0 channel.</TD>
54    </tr>
55  <tr>
56<TD width="25%"><font face="Courier New"><em><strong>Diffusion function</strong></em></font></TD>
57<TD width="45%">Always <font face="Courier New">GX_DF_CLAMP</font>.</TD>
58    </tr>
59  <tr>
60<TD width="25%"><font face="Courier New"><em><strong>Attenuation function</strong></em></font></TD>
61<TD width="45%">Always <font face="Courier New">GX_AF_SPOT</font>.</TD>
62    </tr>
63  <tr>
64<TD width="30%"><a href="../../../gx/Lighting/GXSetChanAmbColor.html"><code>GXSetChanAmbColor</code></a></TD>
65<TD width="25%"><font face="Courier New"><em><strong>Ambient color</strong></em></font></TD>
66<TD width="45%">Only one value.</TD>
67    </tr>
68  <tr>
69<TD width="30%"><a href="../../../gx/Lighting/GXSetChanMatColor.html"><code>GXSetChanMatColor</code></a></TD>
70<TD width="25%"><font face="Courier New"><em><strong>Material color</strong></em></font></TD>
71<TD width="45%">Only one value.</TD>
72    </tr>
73  <tr>
74<TD width="30%" rowspan="2"><a href="../../../gx/Tev/GXSetTevOp.html"><code>GXSetTevOp</code></a></TD>
75<TD width="25%"><font face="Courier New"><em><strong>TEV stage ID</strong></em></font></TD>
76<TD width="45%">Always <font face="Courier New">GX_TEVSTAGE0</font>.</TD>
77    </tr>
78  <tr>
79<TD width="25%"><font face="Courier New"><em><strong>Mode</strong></em></font></TD>
80<TD width="45%"><font face="Courier New">GX_MODULATE</font>, <font face="Courier New">GX_REPLACE</font>.</TD>
81    </tr>
82  <tr>
83<TD width="30%" rowspan="4"><a href="../../../gx/PixelProc/GXSetBlendMode.html"><code>GXSetBlendMode</code></a></TD>
84<TD width="25%"><font face="Courier New"><em><strong>Types</strong></em></font></TD>
85<TD width="45%"><font face="Courier New">GX_BM_BLEND</font></TD>
86    </tr>
87  <tr>
88<TD width="25%"><font face="Courier New"><em><strong>src factor</strong></em></font></TD>
89<TD width="45%"><font face="Courier New">GX_BL_SRCALPHA</font></TD>
90    </tr>
91  <tr>
92<TD width="25%"><font face="Courier New"><em><strong>dst factor</strong></em></font></TD>
93<TD width="45%"><font face="Courier New">GX_BL_INVSRCALPHA</font></TD>
94    </tr>
95  <tr>
96<TD width="25%"><font face="Courier New"><em><strong>op</strong></em></font></TD>
97<TD width="45%">N/A</TD>
98    </tr>
99</TABLE>
100<h2>Operation Method</h2>
101
102<P>START exits the test. </P>
103<P>The A Button changes the shape of the front panel.
104</P>
105<P>The B Button selects a light (color light/alpha light). The selected light blinks. </P>
106<P>The Control Stick changes the direction of the selected light.
107</P>
108<h2>Snapshot</h2>
109
110<P>The lower left is the alpha light and upper right is the color (White) light.</P>
111<P><IMG src="./images/lit-tx-alpha.jpg" alt="lit-tx-alpha.jpg (35938 bytes)" width="640" height="480"></p>
112
113<h2>Required Data Files</h2>
114
115<p><font face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTextrs.tpl</font></p>
116<H2>Revision History</H2>
117<P>03/01/2006 Initial version.</P>
118</body>
119</html>