linux-wallpaperengine/docs/textures/TEXTURE_FORMAT.md
Alexis Maiquez cfdd92d173 + added missing table headers on TEXTURE_FORMAT.md
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 16:41:02 +02:00

2.1 KiB

Texture storage format

Wallpaper engine uses a custom texture storage format converted by resourcecompiler.exe

Header

Information Size Default value
File type indicator 8 bytes TEXV0005
Padding 1 byte Null terminator for string
Extra file type indicator? 8 bytes TEXI0001
Padding 1 byte Null terminator for string
Texture type 4 bytes 0 => ARGB8888, 4 => DXT5, 6 => DXT3, 7 => DXT1, 8 => RG88, 9 => R8
Texture flags 4 bytes Flags for the texture (1 => Interpolation, 2 => ClampUVs, 4 => IsGif)
Texture Width 4 bytes Texture's full width
Texture Height 4 bytes Texture's full height
Width 4 bytes Image's width
Height 4 bytes Image's height
Unknown data 4 bytes To be reversed
Container version 8 bytes TEXB0003/TEXB0002/TEXB0001
Padding 1 byte Null terminator for string
Texture information x bytes Varies depending on the container version

TEXB0003

Information Size Default value
Unknown data 4 bytes To be reversed
Free image format 4 bytes The type of file this texture is based off the FREEIMAGE library
Mip map levels 4 bytes The number of mipmap levels stored for this texture
Mipmap entry x bytes See Mipmap entries

TEXB0002 and TEXB0001

Information Size Default value
Unknown data 4 bytes To be reversed
Mip map levels 4 bytes The number of mipmap levels stored for this texture
Mipmap entry x bytes See Mipmap entries

Mipmap entries

Information Size Default value
Width 4 bytes Mipmap's entry width
Height 4 bytes Mipmap's entry height
Compression flag 4 bytes Indicates if the content is compressed or not
Next image size 4 bytes Image block size (uncompressed)
Next image size 4 bytes Image block size (compressed)
Mipmap pixels x bytes Actual bitmap data in the format specified