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>GXSetIndTexMtx</title>
10</head>
11
12<body>
13<h1 align="left">GXSetIndTexMtx</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/gx.h&gt;
18
19void GXSetIndTexMtx(
20    <A href="../Enumerated_Types/GXIndTexMtxID.html">GXIndTexMtxID</A>   mtx_sel,
21    const f32       offset_mtx[2][3],
22    s8              scale_exp );
23</pre></dd></dl>
24
25<h2>Arguments</h2>
26<TABLE class="arguments" border="1" >
27  <tr>
28<TH>mtx_sel</TH>
29<TD>The indirect matrix that is being affected. Accepted values are:<BR>
30      <TABLE class="arguments" border="1" >
31          <tr>
32<TD bgcolor="#C0C0C0">Name</TD>
33<TD bgcolor="#C0C0C0">Indirect matrix</TD>
34          </tr>
35          <tr>
36<TH>GX_ITM_0</TH>
37<TD>Indirect matrix 0 and matrix scale value 0.</TD>
38          </tr>
39          <tr>
40<TH>GX_ITM_1</TH>
41<TD>Indirect matrix 1 and matrix scale value 1.</TD>
42          </tr>
43          <tr>
44<TH>GX_ITM_2</TH>
45<TD>Indirect matrix 2 and matrix scale value 2.</TD>
46          </tr>
47      </TABLE>
48    </TD>
49  </tr>
50  <tr>
51<TH>offset_mtx</TH>
52<TD>Value assigned to the indirect matrix. Each component must fall in the range -1 &#x2266; <EM>x</EM> &#x2266; +1.</TD>
53  </tr>
54  <tr>
55<TH>scale_exp</TH>
56<TD>Exponent of 2 to assign to the scale factor. The exponent must fall in the range -17 &#x2266; <EM>x</EM> &#x2266; +46. Since the output values are stored in a S17.7 format, take notice of the range of output values to avoid overflow when you use large or small scale factor.</TD>
57  </tr>
58</TABLE>
59
60<h2>Return Values</h2>
61<p>None.</p>
62
63<H2>Description</H2>
64<P>This function lets you set one of the three static indirect matrices and the associated scale factor.&nbsp;The indirect matrix and scale is used to process the results of an indirect lookup in order to produce offsets to use during a regular lookup.&nbsp;The matrix is multiplied by the [S T U] offsets that have been extracted (and optionally biased) from the indirect lookup color.&nbsp;In this matrix-vector multiply, the matrix is on the left and the [S T U] column vector is on the right.</P>
65<P>The matrix values are stored in the hardware as a sign and 10 fractional bits (two's complement).&nbsp;Thus the smallest number that can be stored is -1 and the largest is (1 - 1/1024) or approximately 0.999.&nbsp;Since +1 cannot be stored, you may consider dividing all the matrix values by two (thus +1 becomes +0.5) and adding one to the scale value in order to compensate.</P>
66
67<h2>See Also</h2>
68<P class="reference">
69<A href="GXSetTevIndirect.html">GXSetTevIndirect</A>,
70<A href="GXSetTevIndBumpST.html">GXSetTevIndBumpST</A>,
71<A href="GXSetTevIndBumpXYZ.html">GXSetTevIndBumpXYZ</A>,
72<A href="GXSetTevIndTile.html">GXSetTevIndTile</A>,
73<A href="GXSetTevIndWarp.html">GXSetTevIndWarp</A>
74</p>
75
76<H2>Revision History</H2>
77<P>
782006/03/01 Initial version.<br>
79</P>
80
81<hr><p>CONFIDENTIAL</p></body>
82</HTML>