The RDP has a small on-chip memory for buffering up to eight tile descriptors at a time. A tile descriptor contains all the information for a texture tile including format; size; line; TMEM address; palette; mirror enable S, T; mask S, T; shift S, T; SL, TL; SH, TH; and clamp S, T.
Format of texels in texture tile.
Format Value | Format |
---|---|
0 | RGBA |
1 | YUV |
2 | CI |
3 | IA |
4 | I |
Size of texels in texture tile.
Size Value | Size of texel in bits |
---|---|
0 | 4 |
1 | 8 |
2 | 16 |
3 | 32 |
Number of 64-bit words in one row of the tile. Dependent on tile row width as well as texel type/size. When tiles are loaded using the LoadTile command, the rows are padded to 64-bit boundaries. When LoadBlock is used to load a texture, it is assumed that the rows have already been padded. Line can also be used to control the stride through TMEM. By controlling Line, smaller tiles can be pieced together into one larger continuous tile.
Tile offset (0-511) in TMEM (64-bit) words.
Palette number (0-15) of 4-bit Color Index (CI) textures. An 8-bit index into the high half of TMEM is formed by placing the palette number in the 4 MSBs and the 4-bit texel value in the 4 LSBs. The color in TMEM at this index becomes the color of the pixel. Therefore, for a 4-bit CI texture, you may select one of 16 palettes with each palette having up to 16 entries. Palettes can be loaded into TMEM using the LoadTLUT command or, optionally, the LoadBlock command.
This enables mirroring of texture coordinates. When the bit indicated by the (Mask Value + 1) is 0, the coordinates are unchanged. When this bit is 1, however, the coordinates are inverted. Useful for symmetric patterns like trees, faces, etc. For example, a mask of 2 with mirror enabled would yield the following texture coordinates:
0,1,2,3,4,5,6,7,... Input coordinate 0,1,2,3,3,2,1,0,... Mirrored Coordinate
This is the number of bits of tile coordinate to let through. For example, a mask of 1 indicates one bit of the texture coordinate should come through the mask, giving a pattern of 0,1,0,1...As another example, a mask value of 5 indicates that the texture should wrap every 32 texels, i.e., the lower 5 bits are passed through the mask. A mask value of 0 forces clamping the texture coordinates to be between (SL,TL),(SH,TH) inclusive. The mask value + 1 indicates the bit position that is looked at for mirroring. See discussion in Mirror Enable, above.
This is the shifting of texture coordinates after perspective division. It is used in MIP maps and possibly for precision reasons (see Section 13.7.5.1 "Detail Texture" later in this document).
Shift Value | Shift |
---|---|
0 | no shift |
1 | >>1 |
2 | >>2 |
3 | >>3 |
4 | >>4 |
5 | >>5 |
6 | >>6 |
7 | >>7 |
8 | >>8 |
9 | >>9 |
10 | >>10 |
11 | <<5 |
12 | <<4 |
13 | <<3 |
14 | <<2 |
15 | <<1 |
Also useful for combining two differently scaled textures.
When rendering, this is the starting texel column/row of tile in texture image space(10.2 fixed point). By changing the value of SL,TL you can slide texture w.r.t. on the primitive. When loading, this is the starting texel column/row within the DRAM texture image.
When rendering, this is the ending texel column/row of tile in texture image space(10.2 fixed point). It is used for clamping only. When loading, this is the ending texel column/row within the DRAM texture image.
This is the enable clamp during wrap or mirror. When not masking, Clamp S,T is ignored and clamping is implicitly enabled. This bit allows clamping of the texture coordinates when the mask is non-zero. It is useful when you want to mirror and then clamp, as with an airplane wing insignia. The border of the insignia would have an alpha of 0. For example, SH = 11, mask = 2, mirror = 1, clamp = 1:
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,... Input Coordinate 0,1,2,3,3,2,1,0,0,1, 2, 3, 3, 3, 3, 3,... Mirrored/Clamped Coordinates