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 16<H2>Coverage</H2> 17<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 18 <TBODY> 19 <TR> 20<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD> 21<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 22<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 23 </TR> 24 <TR> 25<TD width="30%" rowspan="3"><A href="../../../gx/Tev/GXSetTevSwapMode.html"><CODE><CODE>GXSetTevSwapMode</CODE></CODE></A></TD> 26<TD width="25%"><SPAN class="argument">TEV stage ID</SPAN></TD> 27<TD width="45%"><CODE>GX_TEVSTAGE0</CODE></TD> 28 </TR> 29 <TR> 30<TD width="25%"><SPAN class="argument">Swap mode for rasterized color.</SPAN></TD> 31<TD width="45%"><STRONG><CODE>GX_TEV_SWAP0</CODE> - <CODE>GX_TEV_SWAP3</CODE></STRONG></TD> 32 </TR> 33 <TR> 34<TD width="25%"><SPAN class="argument">Swap mode for texture color.</SPAN></TD> 35<TD width="45%"><STRONG><CODE>GX_TEV_SWAP0</CODE> - <CODE>GX_TEV_SWAP3</CODE></STRONG></TD> 36 </TR> 37 <TR> 38<TD width="30%" rowspan="5"><A href="../../../gx/Tev/GXSetTevSwapModeTable.html"><CODE><CODE>GXSetTevSwapModeTable</CODE></CODE></A></TD> 39<TD width="25%"><SPAN class="argument">Swap mode table ID</SPAN></TD> 40<TD width="45%"><STRONG><CODE>GX_TEV_SWAP0</CODE> - <CODE>GX_TEV_SWAP3</CODE></STRONG></TD> 41 </TR> 42 <TR> 43<TD width="25%"><SPAN class="argument">Color input mapped to red output.</SPAN></TD> 44<TD width="45%" rowspan="4">Any combination of <strong><CODE>GX_CH_RED</CODE></strong>, <strong><CODE>GX_CH_GREEN</CODE></strong>, <strong><CODE>GX_CH_BLUE</CODE></strong> and <strong><CODE>GX_CH_ALPHA</CODE></strong>.</TD> 45 </TR> 46 <TR> 47<TD width="25%"><SPAN class="argument">Color input mapped to green output.</SPAN></TD> 48 </TR> 49 <TR> 50<TD width="25%"><SPAN class="argument">Color input mapped to blue output.</SPAN></TD> 51 </TR> 52 <TR> 53<TD width="25%"><SPAN class="argument">Color input mapped to alpha output.</SPAN></TD> 54 </TR> 55 <TR> 56<TD width="30%"><A href="../../../gx/Tev/GXSetNumTevStages.html"><CODE><CODE>GXSetNumTevStages</CODE></CODE></A></TD> 57<TD width="25%"><SPAN class="argument">Number of TEV Stages</SPAN></TD> 58<TD width="45%">Always 1</TD> 59 </TR> 60 <TR> 61<TD width="30%" rowspan="2"><A href="../../../gx/Tev/GXSetTevOp.html"><CODE>GXSetTevOp</CODE></A></TD> 62<TD width="25%"><SPAN class="argument">TEV stage ID</SPAN></TD> 63<TD width="45%">Always <CODE>GX_TEVSTAGE0</CODE></TD> 64 </TR> 65 <TR> 66<TD width="25%"><SPAN class="argument">TEV operation</SPAN></TD> 67<TD width="45%"><CODE>GX_PASSCLR</CODE>, <CODE>GX_REPLACE</CODE></TD> 68 </TR> 69 <TR> 70<TD width="30%" rowspan="4"><A href="../../../gx/PixelProc/GXSetBlendMode.html"><CODE><CODE>GXSetBlendMode</CODE></CODE></A></TD> 71<TD width="25%"><SPAN class="argument">Blend mode</SPAN></TD> 72<TD width="45%"><CODE>GX_BM_BLEND</CODE></TD> 73 </TR> 74 <TR> 75<TD width="25%"><SPAN class="argument">src factor</SPAN></TD> 76<TD width="45%"><CODE>GX_BL_ONE</CODE>, <CODE>GX_BL_ZERO</CODE></TD> 77 </TR> 78 <TR> 79<TD width="25%"><SPAN class="argument">dst factor</SPAN></TD> 80<TD width="45%"><CODE>GX_BL_ZERO</CODE>, <CODE>GX_BL_INVSRCALPHA</CODE></TD> 81 </TR> 82 <TR> 83<TD width="25%"><SPAN class="argument">Logic calculations</SPAN></TD> 84<TD width="45%">N/A</TD> 85 </TR> 86 </TBODY> 87</TABLE> 88 89<H2>Using the Demo</H2> 90<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 and off.</P> 91 92<H2>Snapshot</H2> 93<P>Normal setting.</P> 94<P><IMG src="./images/tev-swap-0.jpg" alt="tev-swap-0.jpg (45549 bytes)" width="640" height="448"></P> 95<P>The red component is broadcast to each of RGB channels.</P> 96<P><IMG src="./images/tev-swap-1.jpg" alt="tev-swap-1.jpg (35934 bytes)" width="640" height="448"></P> 97<P>More complicated component swapping.</P> 98<P><IMG src="./images/tev-swap-2.jpg" alt="tev-swap-2.jpg (38900 bytes)" width="640" height="448"></P> 99 100<H2>Required Data Files</H2> 101<P><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTests/tex-02/rgba8_1.tpl</CODE></P> 102 103<H2>Revision History</H2> 104<P> 1052006/03/01 Initial version.<br> 106</P> 107 108<hr><p>CONFIDENTIAL</p></body> 109</HTML>