List 3-1 | |
|
The third and fourth arguments of gDPLoadTextureBlock express the format of the texture image that is to be loaded and the texel size. The texture format tells how the texture image is displayed in color space. The N64 can utilize any of the following five kinds of texture formats:
G_IM_FMT_RGBA | Texels expressed as RGB and alpha value | |
G_IM_FMT_IA | Texels expressed as intensity (R=G=B=I) and alpha value | |
G_IM_FMT_I | Texels expressed only as intensity (R=G=B=A=I) | |
G_IM_FMT_YUV | YUV*1Texels expressed in YUV*1 format | |
G_IM_FMT_CI | Texels expressed by color index (i.e., using palettes) |
The texel size expresses the number of bits of each texel. It can be any of the following four:
G_IM_SIZ_32b | ||
G_IM_SIZ_16b | ||
G_IM_SIZ_8b | ||
(G_IM_SIZ_4b) | ||
(*) | G_IM_SIZ_4b cannot be used with the gDPLoadTextureBlock command. | |
To use this size, please use the gDPLoadTextureBlock_4b command. |
The texture image should express a texture format and texel size that is appropriate for a given picture quality and the way in which the image is to be used. However, you cannot combine all texture formats with all texel sizes in any which way you want. The following table shows the permissible combinations and the bit allocation for each component in the specified situation.
@ | G_IM_SIZ_(size) | ||||
4b | 8b | 16b | 32b | ||
G_IM_FMT_ (format) |
RGBA | X (5/5/5/1) |
X (8/8/8/8) |
||
YUV*1 | X | ||||
CI | X | X | |||
IA | X (3/1) |
X (4/4) |
X (8/8) |
||
I | X | X |
The samples in this tutorial do not deal with color index textures and YUV*1 textures. If you are going to use color index textures, remember to set the texture lookup table using the gDPLoadTLUT_pal* command. Similarly, if you are going to use YUV*1 textures, remember to perform color conversion in the Texture Filter using the gDPSetConvert and gDPSetTextureConvert commands.
*1The operation of YUV textures is not guaranteed at the present time.