13.3 Texture Image Space

Texture coordinates are defined for textured primitives in Texture Image Space. This space has a range of +/- 1K texel. Tiles are smaller rectangular regions of a texture that fit into the on-chip texture memory of the RCP (TMEM).

Figure 13-2 Image Space and Tile Space
[Figure 13-2]

Tiles are defined in Texture Image Space using SL, TL and SH, TH coordinates, as shown in the figure above. Tile coordinates must lie in the positive S,T quadrant of Texture Image Space. However texture coordinates of the primitive can lie in any of the four quadrants of image space. In other words, primitives can have negative texture coordinates which can be useful when wrapping a texture on a very large primitive. Tiles can be up to 1024 columns wide and up to 256 rows tall. Tiles do not have to be sized to a power of 2 (wrapping and mirroring, however, happen on power-of-2 boundaries).

The texture coordinates of the primitive (in Texture Image Space) are converted into Tile Space by subtracting the SL,TL from the (possibly perspective-corrected) texture coordinates of the pixel. This indirection allows arbitrary placement of the tile with respect to the primitive. This implies that the texture coordinates can be defined once in the database; and that the texture can be translated (or slid) with respect to the primitive by simply manipulating the SL,TL values using the SetTileSize RDP command.

UP