#include <revolution/gx.h>void GXSetTexCoordScaleManually(GXTexCoordIDtexcoord, GXBool enable, u16 ss, u16 ts);
texcoord |
Describes the changed texture coordinate ID. Accepted values are: GX_TEXCOORD0, GX_TEXCOORD1, GX_TEXCOORD2 through GX_TEXCOORD7. |
enable |
Scale is set manually if GX_TRUE is set. Scale is set automatically if GX_FALSE is set (ss and ts are ignored). |
ss |
Manually sets scale value for calculating the S component (width) of the coordinate. |
ts |
Manually sets scale value for calculating the T component (height) of the coordinate. |
None.
This function lets you manually assign the scale values that are used for a given texcoord, overwriting the automatic scale values for texture coordinates. Setting the enable argument to GX_TRUE yields this behavior. The given texcoord retains these manual scale values until this function is called again. This function is also used to return a given texture coordinate back to normal, automatic scaling (by setting enable to GX_FALSE).
A texture coordinate is scaled after being calculated by the relevant texgen and before the actual texture lookup. Normally, the scale value is set by GXSetTevOrder according to the texture map associated with the texcoord. However, there are certain cases where a different scale value is desirable. One such case is when using indirect tile textures (see GXSetTevIndTile).
NB: In addition to the texture coordinate scale, GX also automatically sets the texture coordinate range bias mode by default. If you configure a texture coordinate to be scaled manually, the associated range bias is no longer automatically set by GX. Resultantly, you have to call GXSetTexCoordBias to set the proper bias mode. These two functions should always be called together.
03/01/2006 Initial version.