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-alpha</title> 10</head> 11 12<body> 13 14<h1 align="left">lit-alpha</h1> 15 16<h2>Description</h2> 17<P>This program tests multiple lighting channels. Each of the four channels uses one light, and you can choose which channel should be displayed. The alpha light makes an object transparent by using alpha blending.</P> 18 19<h2>Coverage</h2> 20<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 21 <tr> 22<TD width="30%" bgcolor="#C0C0C0"><em><strong>Functions</strong></em></TD> 23<TD width="25%" bgcolor="#C0C0C0"><em><strong>Parameters</strong></em></TD> 24<TD width="45%" bgcolor="#C0C0C0"><em><strong>Description</strong></em></TD> 25 </tr> 26 <tr> 27<TD width="30%"><a href="../../../gx/Lighting/GXInitLightPos.html"><code>GXInitLightPos</code></a></TD> 28<TD width="25%"><SPAN class="argument">Position coordinate (x, y, z)</SPAN></TD> 29<TD width="45%">Various values.</TD> 30 </tr> 31 <tr> 32<TD width="30%"><a href="../../../gx/Lighting/GXSetNumChans.html"><code>GXSetNumChans</code></a></TD> 33<TD width="25%"><SPAN class="argument">Number of color channels.</SPAN></TD> 34 <TD width="45%"><strong>2</strong></TD> 35 </tr> 36 <tr> 37<TD width="30%" rowspan="7"><a href="../../../gx/Lighting/GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></TD> 38<TD width="25%"><SPAN class="argument">Color channel ID</SPAN></TD> 39<TD width="45%"><CODE><strong>GX_COLOR0</strong></CODE>, <CODE><strong>GX_ALPHA0</strong></CODE>, <CODE><strong>GX_COLOR1</strong></CODE>, <CODE><strong>GX_ALPHA1</strong></CODE>.</TD> 40 </tr> 41 <tr> 42<TD width="25%"><SPAN class="argument">Channel enable</SPAN></TD> 43<TD width="45%">Always <CODE>GX_ENABLE</CODE>.</TD> 44 </tr> 45 <tr> 46<TD width="25%"><SPAN class="argument">Ambient color source</SPAN></TD> 47<TD width="45%">Always <CODE>GX_SRC_REG</CODE>.</TD> 48 </tr> 49 <tr> 50<TD width="25%"><SPAN class="argument">Material color source</SPAN></TD> 51<TD width="45%">Always <CODE>GX_SRC_REG</CODE>.</TD> 52 </tr> 53 <tr> 54<TD width="25%"><SPAN class="argument">Light mask</SPAN></TD> 55<TD width="45%"><CODE>GX_LIGHT0</CODE> for Color0 channel.<br> <CODE>GX_LIGHT1</CODE> for Alpha0 channel.<br> <CODE>GX_LIGHT2</CODE> for Color1 channel.<br> <CODE>GX_LIGHT3</CODE> for Alpha1 channel.</TD> 56 </tr> 57 <tr> 58<TD width="25%"><SPAN class="argument">Diffusion function</SPAN></TD> 59<TD width="45%">Always <CODE>GX_DF_CLAMP</CODE>.</TD> 60 </tr> 61 <tr> 62<TD width="25%"><SPAN class="argument">Attenuation function</SPAN></TD> 63<TD width="45%">Always <CODE>GX_AF_NONE</CODE>.</TD> 64 </tr> 65 <tr> 66<TD width="30%" height="38" rowspan="2"><a href="../../../gx/Lighting/GXSetChanAmbColor.html"><code>GXSetChanAmbColor</code></a></TD> 67<TD width="25%" height="19"><SPAN class="argument">Color channel ID</SPAN></TD> 68<TD width="45%" height="19"><CODE><strong>GX_COLOR0A0</strong></CODE>, <CODE><strong>GX_COLOR1A1</strong></CODE>.</TD> 69 </tr> 70 <tr> 71<TD width="25%" height="19"><SPAN class="argument">Ambient color</SPAN></TD> 72<TD width="45%" height="19">Only one color.</TD> 73 </tr> 74 <tr> 75<TD width="30%" height="38" rowspan="2"><a href="../../../gx/Lighting/GXSetChanMatColor.html"><code>GXSetChanMatColor</code></a></TD> 76<TD width="25%" height="19"><SPAN class="argument">Color channel ID</SPAN></TD> 77<TD width="45%" height="19"><strong><CODE>GX_COLOR0A0</CODE></strong>, <strong><CODE>GX_COLOR1A1</CODE></strong>.</TD> 78 </tr> 79 <tr> 80<TD width="25%" height="19"><SPAN class="argument">Material color</SPAN></TD> 81<TD width="45%" height="19">Only one color.</TD> 82 </tr> 83 <tr> 84<TD width="30%" rowspan="4"><a href="../../../gx/PixelProc/GXSetBlendMode.html"><code>GXSetBlendMode</code></a></TD> 85<TD width="25%"><SPAN class="argument">Types</SPAN></TD> 86<TD width="45%"><CODE>GX_BM_BLEND</CODE></TD> 87 </tr> 88 <tr> 89<TD width="25%"><SPAN class="argument">Input factor</SPAN></TD> 90<TD width="45%"><CODE>GX_BL_INVSRCALPHA</CODE></TD> 91 </tr> 92 <tr> 93<TD width="25%"><SPAN class="argument">Output factor</SPAN></TD> 94<TD width="45%"><CODE>GX_BL_SRCALPHA</CODE></TD> 95 </tr> 96 <tr> 97<TD width="25%"><SPAN class="argument">Logic calculations</SPAN></TD> 98<TD width="45%">N/A</TD> 99 </tr> 100</TABLE> 101 102<h2>Using the Demo</h2> 103<P>START exits the test.</P> 104<P>The Control Stick moves the position of the selected light.</P> 105<P>The C Stick rotates the model. </P> 106<P>A Button changes the model. </P> 107<P>B Button toggles color channel to display.</P> 108<P>The L and R Buttons select a light. </P> 109 110<h2>Snapshot</h2> 111<p>An opaque sphere (inside) and a half-transparent sphere (outside). Color channel 0 is used.</p> 112<P><IMG src="./images/lit-alpha-0.jpg" alt="lit-alpha-0.jpg (8609 bytes)" width="480" height="360"></p> 113 114<p>Cylinders with color channel 1. </p> 115<P><IMG src="./images/lit-alpha-1.jpg" alt="lit-alpha-1.jpg (9239 bytes)" width="480" height="360"></p> 116 117<p>Regular icosahedra with color channel 0. </p> 118<P><IMG src="./images/lit-alpha-2.jpg" alt="lit-alpha-2.jpg (8316 bytes)" width="480" height="360"></p> 119 120<p>Regular dodecahedra with color channel 1. </p> 121<P><IMG src="./images/lit-alpha-3.jpg" alt="lit-alpha-3.jpg (9129 bytes)" width="480" height="360"></p> 122 123<h2>Required Data Files</h2> 124<p>None.</p> 125 126<H2>Revision History</H2> 127<P> 1282006/03/01 Initial version.<br> 129</P> 130 131<hr><p>CONFIDENTIAL</p></body> 132</html>