CrossChannel Nintendo Switch .xtx

Textures, recreate headers, conversions, algorithms and parsing of image files
masagrator
Posts: 82
Joined: Sat Dec 22, 2018 10:03 am

CrossChannel Nintendo Switch .xtx

Post by masagrator »

If you think this is Tegra format file that is used in Nintendo games, then you will be disappointed.

I can't figure out this texture.

Header size is 0x20

MAGIC is xtx\x00
Values are stored as big endian
0x4 is storing unknown data (it's not a type or layer count)
0x8 and 0x10 has one dimension, 0xC and 0x14 has another dimension
one dimension is 0x300 (768), second dimension is 0xC0 (192), each pixel is 2 bytes

Was testing it with r16, r8g8, bgra4 and b5g5r5a1, getting only garbage with and without deswizzling.

Any help will be appreciated.