TEX/v0: Difference between revisions

From wowdev
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
TEX files seem to have been introduced with Cataclysm. One per continent (e.g. Azeroth.tex). Chunked structure. Internally called 'TextureBlob'.
{{Template:SectionBox/VersionRange|min_expansionlevel=4}}
This is storing really low resolution textures for use if the real file is not yet loaded or streamed. One per continent (e.g. Azeroth.tex) and some special ones (spell effects by class). [[Chunk|Chunked]] structure. Internally called 'TextureBlob'.


also see [[Cataclysm#tex_(new)]]
==structure==
 
While this is properly chunked, order is required.
= Chunks =
===TXVR===
== TXVR - Texture Version ==
uint32_t version; // As of 4.0.12479 and 6.0.1.18179: 0. Not checked by client.
As of 4.0.12479, 0
===TXBT===
 
struct SBlobTexture {
Rev 13329:
  uint32_t filenameOffset;
8 Byte of Data, actual only containing a 4 in the first Byte. (CataclysmCTF.tex)
  uint32_t txmdOffset; // TXMD-chunk offset relative to end of TXFN-chunk.
 
  uint8_t sizex;
== TXBT - ? ==
  uint8_t sizey; // special case: sizex = sizey * 6
Unknown
  uint7_t m_numLevels; // mipmaps
== TXFN - Texture Filenames ==
  uint1_t loaded;
\0-delimited list of filenames
  uint4_t dxt_type; // 0  = Dxt1, 1 = Dxt3, 2 = Dxt5
== TXMD - ? ==
  uint4_t flags; // 1 = if dxt_type = Dxt1, prefer Argb1555 over Rgb565, if Dxt1 unavailable
Rest of the file is made up with TXMD chunks
} entries[];
===TXFN===
char filenames[]; // zero-terminated, no file ending
===TXMD[]===
char textureData[]; // length depends on size, type and flags.


Can contain multiple mipmap levels for one texture. See UpdateBlobTexture() for unpacking.
[[Category:Format]]
[[Category:Format]]

Revision as of 13:00, 14 April 2016

This section only applies to versions ≥ Cata.

This is storing really low resolution textures for use if the real file is not yet loaded or streamed. One per continent (e.g. Azeroth.tex) and some special ones (spell effects by class). Chunked structure. Internally called 'TextureBlob'.

structure

While this is properly chunked, order is required.

TXVR

uint32_t version; // As of 4.0.12479 and 6.0.1.18179: 0. Not checked by client.

TXBT

struct SBlobTexture {
  uint32_t filenameOffset;
  uint32_t txmdOffset; // TXMD-chunk offset relative to end of TXFN-chunk.
  uint8_t sizex;
  uint8_t sizey; // special case: sizex = sizey * 6
  uint7_t m_numLevels; // mipmaps
  uint1_t loaded;
  uint4_t dxt_type; // 0  = Dxt1, 1 = Dxt3, 2 = Dxt5
  uint4_t flags; // 1 = if dxt_type = Dxt1, prefer Argb1555 over Rgb565, if Dxt1 unavailable
} entries[];

TXFN

char filenames[]; // zero-terminated, no file ending

TXMD[]

char textureData[]; // length depends on size, type and flags.

Can contain multiple mipmap levels for one texture. See UpdateBlobTexture() for unpacking.