Texture/PlayStation 3

= Structures = The majority of this information is from the SCE PS3 SDK: CellGcmTexture datatype reference, though Burnout's debugging symbols were also referenced.

Format
Swizzling and normalization is not used in Burnout, so these flags are unused.

Below is the bitwise structure for the format field.

For example, the following is the DXT5 format as found in Burnout:

Remap
The remap order is only used when one of the following color formats is specified:
 * CELL_GCM_TEXTURE_COMPRESSED_HILO8
 * CELL_GCM_TEXTURE_COMPRESSED_HILO_S8
 * CELL_GCM_TEXTURE_X16
 * CELL_GCM_TEXTURE_Y16_X16
 * CELL_GCM_TEXTURE_Y16_X16_FLOAT

These are not used in Burnout, so the remap field is unused.

Below is the bitwise structure for the remap field. It is unclear whether this is in MSB 0 or LSB 0 notation.

Pitch
Pitch is the texture width multiplied by the bytes per texel. It must be specified when using linear texture formats or DXT compression. If the texture is swizzled or the DXT texture width is a power of 2, pitch is ignored. Otherwise, it must be 16 or more.

Burnout only uses textures with widths at powers of 2, so pitch is unused. However, if it becomes necessary to calculate pitch, the following formula may be used for DXT textures:

Where  is 8 for DXT1 and 16 for DXT2 through DXT5.

= Enumerations = Much of this information is from the SCE PS3 SDK: GCM Method Macros Overview, section 6.4: TextureFormat. Some information is also from the CellGcmTexture datatype documentation. Various other sources are used.

Swizzle flag
Swizzle can only be used when the width is not a power of two. Pitch must be specified.

Dimension
Depth textures cannot be 3D.