GXT: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 16: | Line 16: | ||
== File format == | == File format == | ||
The GXT (.gxt) format | The GXT (.gxt) format consists of: | ||
Header | {| class="wikitable" style="text-align: center;" | ||
|- | |||
! style="background-color:#475854; color:#FFFFFF;" |'''File Layout''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''GXT Header''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''GXT Specification Texture 1 info''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''GXT Specification Texture 2 info''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''...''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''Texture 1''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''Padding''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''Texture 2''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''...''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''Palette P4''' | |||
|- | |||
| style="background-color:lightblue; color:#000000;" |'''Palette P8''' | |||
|- | |||
|} | |||
*For a single texture: | |||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 40: | Line 66: | ||
| 0x10 || 0x04 || 80 00 00 00 || 80 || Total size of the Textures | | 0x10 || 0x04 || 80 00 00 00 || 80 || Total size of the Textures | ||
|- | |- | ||
| 0x14 || 0x04 || 00 00 00 00 || 0 || Number of 16 entry palettes | | 0x14 || 0x04 || 00 00 00 00 || 0 || Number of 16 entry palettes (P4) | ||
|- | |- | ||
| 0x18 || 0x04 || 00 00 00 00 || 0 || Number of 256 entry palettes | | 0x18 || 0x04 || 00 00 00 00 || 0 || Number of 256 entry palettes (P8) | ||
|- | |- | ||
| 0x1C || 0x04 || 00 00 00 00 || 0 || Padding | | 0x1C || 0x04 || 00 00 00 00 || 0 || Padding | ||
|- | |- | ||
|colspan="5" style="text-align:center; background-color:lightblue;" | <span style="color:black;">GXT specification per texture | |colspan="5" style="text-align:center; background-color:lightblue;" | <span style="color:black;">GXT specification per texture</span> | ||
|- | |- | ||
| 0x20 || 0x04 || 40 00 00 00 || 40 || Offset of the single texture data | | 0x20 || 0x04 || 40 00 00 00 || 40 || Offset of the single texture data |
Revision as of 20:11, 29 July 2015
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 consists of:
File Layout |
---|
GXT Header |
GXT Specification Texture 1 info |
GXT Specification Texture 2 info |
... |
Texture 1 |
Padding |
Texture 2 |
... |
Palette P4 |
Palette P8 |
- For a 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 | Total size of the Textures |
0x14 | 0x04 | 00 00 00 00 | 0 | Number of 16 entry palettes (P4) |
0x18 | 0x04 | 00 00 00 00 | 0 | Number of 256 entry palettes (P8) |
0x1C | 0x04 | 00 00 00 00 | 0 | Padding |
GXT specification per texture | ||||
0x20 | 0x04 | 40 00 00 00 | 40 | Offset of the single texture data |
0x24 | 0x04 | 80 00 00 00 | 80 | Size of the single texture data. |
0x28 | 0x04 | FF FF FF FF | - | Index of the palette |
0x2C | 0x04 | 00 00 00 00 | - | Texture flags/Not used? |
0x30 | 0x04 | 00 00 00 00 | - | Texture Type |
0x34 | 0x04 | - | - | Texture format |
0x38 | 0x02 | - | - | Width |
0x3A | 0x02 | - | - | Height |
0x3C | 0x02 | - | - | Mipmaps |
0x3E | 0x02 | - | - | Not Used?/Padding |