GXT: Difference between revisions

From Vita Developer wiki
Jump to navigation Jump to search
mNo edit summary
Line 16: Line 16:


== File format ==
== File format ==
The GXT (.gxt) format consists of:
The GXT (.gxt) format (older version might vary) consists of:


Header (for single texture):
Header (for single texture):
Line 32: Line 32:
| 0x00 || 0x04 || 47 58 54 00 || "GXT " || Magic
| 0x00 || 0x04 || 47 58 54 00 || "GXT " || Magic
|-
|-
| 0x04 || 0x04 || 03 00 00 10 || || Version
| 0x04 || 0x04 || 03 00 00 10 || 3.01 || Version
|-
|-
| 0x08 || 0x04 || 01 00 00 00 || 1 || Number of textures embedded
| 0x08 || 0x04 || 01 00 00 00 || 1 || Number of textures embedded
Line 56: Line 56:
| 0x2C || 0x04  || 00 00 00 00 || - ||  
| 0x2C || 0x04  || 00 00 00 00 || - ||  
|-
|-
| 0x30 || 0x08 || - || - || Flags
| 0x30 || 0x07 || - || - || Flags
|-
| 0x37 || 0x01? || - || - || Flags: Texture format
|-
|-
| 0x38 || 0x02?  || - || - || Height: ?
| 0x38 || 0x02?  || - || - || Height: ?

Revision as of 21:29, 28 July 2015


Standard test image widely used

GXT is a file format (used on PS Vita and PSP) for storing textures. The purpose of this format is to use it in the runtime without any additional formatting of the data.

Features

  • Memory ready format
  • Supports multiple textures in one file
  • Supports compressed, swizzled, and linear texture layouts
  • Supports mipmaps
  • Suports palettized textures

File format

The GXT (.gxt) format (older version might vary) consists of:

Header (for single texture):

Offset (h) Size (h) Example (h) Value (conversion) Notes
GXT header
0x00 0x04 47 58 54 00 "GXT " Magic
0x04 0x04 03 00 00 10 3.01 Version
0x08 0x04 01 00 00 00 1 Number of textures embedded
0x0C 0x04 40 00 00 00 40 Offset of the texture data/ header size
0x10 0x04 80 00 00 00 80 Texture (total?) size
0x14? 0x04 00 00 00 00 Number of 16 entry palettes
0x18? 0x04 00 00 00 00 Number of 256 entry palettes
0x18 0x08 00 ... 00 - Padding
0x20 0x04 40 00 00 00 40 Offset to the (single first?) texture data relative to the start of the file
0x24 0x04 80 00 00 00 80 Texture (single first?) size
GXT specification per texture?
0x28 0x04 FF FF FF FF - Parent?
0x2C 0x04 00 00 00 00 -
0x30 0x07 - - Flags
0x37 0x01? - - Flags: Texture format
0x38 0x02? - - Height: ?
0x3A 0x02? - - Width:?
0x3C 0x02? - - Depth:?
0x3E 0x02? - -