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-specular</title> 10</head> 11 12<body> 13 14<h1 align="left">lit-specular</h1> 15 16 17 18<h2>Description</h2> 19<P>This program does a demonstration of specular lighting. It also uses two light channels to show the overlay of diffuse and specular light colors. A specified light object for a specular light can also act as a pseudo parallel light if used in the diffuse light channel. This property is used in the demo; the same light object <code>(GX_LIGHT0)</code> is applied to both channels.</P> 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>Function</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%"><a href="../../../gx/Lighting/GXInitLightPos.html"><code>GXInitLightPos</code></a></TD> 29<TD width="25%"><em><strong><font face="Courier New">Position coordinate (x, y, z)</font></strong></em></TD> 30<TD width="45%">Appropriate value.</TD> 31 </tr> 32 <tr> 33<TD width="30%"><A href="../../../gx/Lighting/GXInitSpecularDir.html"><CODE>GXInitSpecularDir</CODE></A></TD> 34<TD width="25%"><em><strong><font face="Courier New">Light direction (nx, ny, nz)</font></strong></em></TD> 35<TD width="45%">Appropriate value.</TD> 36 </tr> 37 <tr> 38<TD width="30%"><A href="../../../gx/Lighting/GXInitLightShininess.html"><CODE>GXInitLightShininess</CODE></A></TD> 39<TD width="25%"><em><strong><font face="Courier New">Shininess parameter</font></strong></em></TD> 40<TD width="45%">Various values from 4.0 through 256.0.</TD> 41 </tr> 42 <tr> 43<TD width="30%"><a href="../../../gx/Lighting/GXSetNumChans.html"><code>GXSetNumChans</code></a></TD> 44<TD width="25%"><em><strong><font face="Courier New">Number of color channels.</font></strong></em></TD> 45 <TD width="45%">1, 2</TD> 46 </tr> 47 <tr> 48<TD width="30%" rowspan="7"><a href="../../../gx/Lighting/GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></TD> 49<TD width="25%"><em><strong><font face="Courier New">Color channel ID</font></strong></em></TD> 50<TD width="45%"><font face="Courier New">GX_COLOR0</font>, <font face="Courier New">GX_COLOR1</font>.</TD> 51 </tr> 52 <tr> 53<TD width="25%"><em><strong><font face="Courier New">Channel enable</font></strong></em></TD> 54<TD width="45%">Always <font face="Courier New">GX_ENABLE</font>.</TD> 55 </tr> 56 <tr> 57<TD width="25%"><em><strong><font face="Courier New">Ambient color source</font></strong></em></TD> 58<TD width="45%">Always <font face="Courier New">GX_SRC_REG</font>.</TD> 59 </tr> 60 <tr> 61<TD width="25%"><em><strong><font face="Courier New">Material color source</font></strong></em></TD> 62<TD width="45%">Always <font face="Courier New">GX_SRC_REG</font>.</TD> 63 </tr> 64 <tr> 65<TD width="25%"><em><strong><font face="Courier New">Light mask</font></strong></em></TD> 66<TD width="45%"><font face="Courier New">GX_LIGHT0</font> for both channels.</TD> 67 </tr> 68 <tr> 69<TD width="25%"><em><strong><font face="Courier New">Diffusion function</font></strong></em></TD> 70<TD width="45%"><font face="Courier New">GX_DF_NONE</font>, <font face="Courier New">GX_DF_CLAMP</font>.</TD> 71 </tr> 72 <tr> 73<TD width="25%"><em><strong><font face="Courier New">Attenuation function</font></strong></em></TD> 74<TD width="45%"><font face="Courier New">GX_AF_NONE</font>, <font face="Courier New">GX_AF_SPOT</font>, <font face="Courier New">GX_AF_SPEC</font>.</TD> 75 </tr> 76 <tr> 77<TD width="30%" rowspan="2"><a href="../../../gx/Lighting/GXSetChanAmbColor.html"><code>GXSetChanAmbColor</code></a></TD> 78<TD width="25%"><em><strong><font face="Courier New">Color channel ID</font></strong></em></TD> 79<TD width="45%"><font face="Courier New">GX_COLOR0</font>, <font face="Courier New">GX_COLOR1</font>.</TD> 80 </tr> 81 <tr> 82<TD width="25%"><em><strong><font face="Courier New">Material color</font></strong></em></TD> 83<TD width="45%">Only one color.</TD> 84 </tr> 85 <tr> 86<TD width="30%" rowspan="2"><a href="../../../gx/Lighting/GXSetChanMatColor.html"><code>GXSetChanMatColor</code></a></TD> 87<TD width="25%"><em><strong><font face="Courier New">Color channel ID</font></strong></em></TD> 88<TD width="45%"><font face="Courier New">GX_COLOR0</font>, <font face="Courier New">GX_COLOR1</font>.</TD> 89 </tr> 90 <tr> 91<TD width="25%"><em><strong><font face="Courier New">Material color</font></strong></em></TD> 92<TD width="45%">Only one color.</TD> 93 </tr> 94</TABLE> 95<h2>Operation Method</h2> 96 97<P>End the test with START.</P> 98<P>The Control Stick moves the light.<br> 99</P> 100<P>The C Stick rotates the object.<br> 101</P> 102<P>The B Button changes the model.<br></P> 103<P>The L and R Buttons tune the shininess of specular light.<br></P> 104<P>The Y Button changes the display mode in the following order: Specular only, diffuse only, specular/diffuse added, specular/diffuse blended.<br></P> 105<h2>Snapshot</h2> 106 107<p>Specular light color only.</p> 108 109<P><IMG src="./images/lit-specular-0.jpg" alt="lit-specular-0.jpg (4563 bytes)" width="320" height="240"></p> 110 111<P>Uses two color channels. Diffuse light color is added to specular light color. 112</P> 113<P><IMG src="./images/lit-specular-1.jpg" alt="lit-specular-1.jpg (5116 bytes)" width="320" height="240"></P> 114<h2>Required Data Files</h2> 115 116<p>None.</p> 117<H2>Revision History</H2> 118<P>2006/03/01 Initial version.</P> 119<hr> 120<P>CONFIDENTIAL</p> 121</BODY> 122</HTML>