1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css"> 8<TITLE>tev-swap</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">tev-swap</H1> 12 13<H2>Description</H2> 14<P>This program demonstrates the TEV swap mode. In this demo, you can just apply some color component swapping effect to sample images and view results.</P> 15<H2>Coverage</H2> 16<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 17 <TBODY> 18 <TR> 19<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD> 20<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 21<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 22 </TR> 23 <TR> 24<TD width="30%" rowspan="3"><A href="../../../gx/Tev/GXSetTevSwapMode.html"><CODE>GXSetTevSwapMode</CODE></A></TD> 25<TD width="25%">TEV stage ID.</TD> 26<TD width="45%"><FONT face="Courier New">GX_TEVSTAGE0</FONT></TD> 27 </TR> 28 <TR> 29<TD width="25%">Swap mode for rasterized color.</TD> 30<TD width="45%">GX_TEV_SWAP0 - GX_TEV_SWAP3</TD> 31 </TR> 32 <TR> 33<TD width="25%">Swap mode for texture color.</TD> 34<TD width="45%">GX_TEV_SWAP0 - GX_TEV_SWAP3</TD> 35 </TR> 36 <TR> 37<TD width="30%" rowspan="5"><A href="../../../gx/Tev/GXSetTevSwapModeTable.html"><CODE>GXSetTevSwapModeTable</CODE></A></TD> 38<TD width="25%">Swap mode table ID.</TD> 39<TD width="45%">GX_TEV_SWAP0 - GX_TEV_SWAP3</TD> 40 </TR> 41 <TR> 42<TD width="25%">Color input mapped to red output.</TD> 43<TD width="45%" rowspan="4">Any combination of <strong>GX_CH_RED</strong>, <strong>GX_CH_GREEN</strong>, <strong>GX_CH_BLUE</strong>, <strong>GX_CH_ALPHA</strong>.</TD> 44 </TR> 45 <TR> 46<TD width="25%">Color input mapped to green output.</TD> 47 </TR> 48 <TR> 49<TD width="25%">Color input mapped to blue output.</TD> 50 </TR> 51 <TR> 52<TD width="25%">Color input mapped to alpha output.</TD> 53 </TR> 54 <TR> 55<TD width="30%"><A href="../../../gx/Tev/GXSetNumTevStages.html"><CODE>GXSetNumTevStages</CODE></A></TD> 56<TD width="25%">Number of TEV stages</TD> 57<TD width="45%">Always 1.</TD> 58 </TR> 59 <TR> 60<TD width="30%" rowspan="2"><A href="../../../gx/Tev/GXSetTevColorOp.html"><CODE>GXSetTevOp</CODE></A></TD> 61<TD width="25%">TEV stage ID.</TD> 62<TD width="45%">Always <FONT face="Courier New">GX_TEVSTAGE0</FONT>.</TD> 63 </TR> 64 <TR> 65<TD width="25%">TEV operation</TD> 66<TD width="45%">GX_PASSCLR, GX_REPLACE</TD> 67 </TR> 68 <TR> 69<TD width="30%" rowspan="4"><A href="../../../gx/PixelProc/GXSetBlendMode.html"><CODE>GXSetBlendMode</CODE></A></TD> 70<TD width="25%">The blend mode.</TD> 71<TD width="45%"><FONT face="Courier New">GX_BM_BLEND</FONT></TD> 72 </TR> 73 <TR> 74<TD width="25%">src factor</TD> 75<TD width="45%">GX_BL_ONE, GX_BL_ZERO</TD> 76 </TR> 77 <TR> 78<TD width="25%">dst factor</TD> 79<TD width="45%">GX_BL_ZERO, GX_BL_INVSRCALPHA</TD> 80 </TR> 81 <TR> 82<TD width="25%">op</TD> 83<TD width="45%">N/A</TD> 84 </TR> 85 </TBODY> 86</TABLE> 87<H2>Operation Method</H2> 88<P>PAUSE exits the test. The main stick moves the cursor. The A Button changes the value specified by the cursor. The B Button changes the sample image. The Y button toggles the alpha blending mode ON/OFF.</P> 89 90<H2>Snapshot</H2> 91<P>Normal setting.</P> 92<P><IMG src="./images/tev-swap-0.jpg" alt="tev-swap-0.jpg (45549 bytes)" width="640" height="448"></P> 93<P>Red component is broadcasted to each of RGB channels.</P> 94<P><IMG src="./images/tev-swap-1.jpg" alt="tev-swap-1.jpg (35934 bytes)" width="640" height="448"></P> 95<P>More complicated component swapping.</P> 96<P><IMG src="./images/tev-swap-2.jpg" alt="tev-swap-2.jpg (38900 bytes)" width="640" height="448"></P> 97<H2>Required Data Files</H2> 98<P><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTests/tex-02/rgba8_1.tpl</CODE></P> 99<H2>Revision History</H2> 100<P>2006/03/01 Initial version.</P> 101<hr> 102<P>CONFIDENTIAL</p> 103</BODY> 104</HTML>