Skip to content

Textures

ProgSys edited this page Jun 1, 2024 · 21 revisions

*.TX2 is the format in which almost all Disgaea textures are stored.

They come in six types:

  1. DXT1 (0) - Lossy block compression optimize for the GPU
  2. DXT4 (1) - Lossy block compression optimize for the GPU, with not pre-multiplied alpha (very rare)
  3. DXT5 (2) - Lossy block compression, with explicit alpha, optimize for the GPU
  4. BGRA (3) - Uncompressed image
  5. FONT (4) - Like BGRA but also has fixed colortable with 16 entries (however not sure jet what it does)
  6. Color table BGRA with max 16 entries (16) - Max 16 colors, mostly used for sprites
  7. Color table BGRA with max 255 entries (256) - Max 255 colors

Header

Type Size Description
uShort 2 byte image width
uShort 2 byte image height
uShort 2 byte Image type
uChar 1 byte Power of width
uChar 1 byte Power of height
uShort 2 byte Color table size
uShort 2 byte Number of color tabels
uInt 4 byte is always 65536 (00 00 01 00)?

If color table size is bigger zero, then BGRA colors follow the header. Note, even if color table 16/255 is used there can be less or even more colors be stored.