GXSetTevIndTile

C Specification

#include <revolution/gx.h>
void GXSetTevIndTile( GXTevStageID tev_stage,
GXIndTexStageID ind_stage,
u16 tilesize_s,
u16 tilesize_t,
u16 tilespacing_s,
u16 tilespacing_t,
GXIndTexFormat format,
GXIndTexMtxID matrix_sel,
GXIndTexBiasSel bias_sel, 
GXIndTexAlphaSel alpha_sel);

Arguments

tev_stage the TEV stage to be set
Accepted values are: GX_TEVSTAGE0, GX_TEVSTAGE1, GX_TEVSTAGE2 through GX_TEVSTAGE15.
ind_stage the indirect stage results sued with this TEV stage
Accepted values are:
GX_INDTEXSTAGE0, GX_INDTEXSTAGE1, GX_INDTEXSTAGE2 and GX_INDTEXSTAGE3.
tilesize_s the size of the tile in the S dimension
Applicable values are 16, 32, 64, 128 and 256.
tilesize_t the size of the tile in the T dimension
Applicable values are 16, 32, 64, 128 and 256.
tilespacing_s the spacing of the tiles (in the tile-definition map) in the S dimension
tilespacing_t the spacing of the tiles (in the tile-definition map) in the T dimension
format which indirect texture format to use
Accepted values are:
Name Indirect Offset Data and Bump Alpha
GX_ITF_8 Use all 8 bits as indirect offset data. The same data (the upper 5 bits) is copied as the bump alpha.
GX_ITF_5 Use the lower 5 bits as indirect offset data. The remaining 3 bits are the bump alpha.
GX_ITF_4 Use the lower 4 bits as indirect offset data. The remaining 4 bits are the bump alpha.
GX_ITF_3 Use the lower 3 bits as indirect offset data. The remaining 5 bits are the bump alpha.
matrix_sel The indirect matrix and scale value to multiply the offsets by.
bias_sel the tile stacking direction for pseudo-3D textures
Accepted values are:
Name Bias-applied Components
GX_ITB_NONE none
GX_ITB_S S component only
GX_ITB_T T component only
GX_ITB_U U component only
GX_ITB_ST S and T components
GX_ITB_SU S and U components
GX_ITB_TU T and U components
GX_ITB_STU all S/T/U components
alpha_sel which offset component will supply the indirect bump alpha, if any (for pseudo-3D textures)
Accepted values are:
Name Bump Alpha Source
GX_ITBA_OFF no bump alpha
GX_ITBA_S S component supplies bump alpha
GX_ITBA_T T component supplies bump alpha
GX_ITBA_U U component supplies bump alpha

Return Values

None.

Description

This function can be used to implement tile textures that use indirect textures. It will set up the correct values in the given indirect matrix; you only need to specify which matrix slot to use.

Be aware that the regular texture map contains only the tile definitions. The actual texture size to be applied to the polygon being drawn is the product of the base tile size and the size of the indirect map. The GXSetTexCoordScaleManually function must be called to set the appropriate texture coordinate scale. GXSetIndTexCoordScale can be used to use the same texcoord for the indirect stage as for the regular TEV stage.

See Also

GXSetTevIndirect
GXSetTexCoordScaleManually
GXSetIndTexCoordScale

Revision History

03/01/2006 Initial version.