#include <revolution/gx.h>
void GXSetIndTexMtx(
GXIndTexMtxID mtx_sel,
const f32 offset_mtx[2][3],
s8 scale_exp );
| mtx_sel | The indirect matrix that is being affected. Accepted values are:
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
| offset_mtx | Value assigned to the indirect matrix. Each component must fall in the range -1 ≦ x ≦ +1. | ||||||||
| scale_exp | Exponent of 2 to assign to the scale factor. The exponent must fall in the range -17 ≦ x ≦ +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. |
None.
This function lets you set one of the three static indirect matrices and the associated scale factor. 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. The matrix is multiplied by the [S T U] offsets that have been extracted (and optionally biased) from the indirect lookup color. In this matrix-vector multiply, the matrix is on the left and the [S T U] column vector is on the right.
The matrix values are stored in the hardware as a sign and 10 fractional bits (two's complement). Thus the smallest number that can be stored is -1 and the largest is (1 - 1/1024) or approximately 0.999. 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.
GXSetTevIndirect, GXSetTevIndBumpST, GXSetTevIndBumpXYZ, GXSetTevIndTile, GXSetTevIndWarp
2006/03/01 Initial version.
CONFIDENTIAL