-
Notifications
You must be signed in to change notification settings - Fork 4
TEX Format
Niema Moshiri edited this page May 27, 2019
·
17 revisions
TEX is a texture format and is used throughout Final Fantasy VII. The TEX format consists of a header, an optional palette, and bitmap data. Usually, data are stored as a palletized picture, with bitmap pixels referencing the palette. The color #000000 is often used to denote transparency (but not always; it depends on the color key status; more info later). The TEX format is very flexible and can take almost any non-paletted format as long as it is described properly in the header. This wiki might help decode the format.
A TEX file's header gives general information about the TEX file.
- This is an unsigned integer and must always equal 1 for Final Fantasy VII to load
- These 4 bytes have unknown function
- This is an unsigned integer
- According to this, this must be 1 (i.e.,
00000001
) to enable transparent color- All the
**ac
files have it as 1
- All the
- These 4 bytes have unknown function
- These 4 bytes have unknown function
- This is an unsigned integer
- The D3D driver uses this to determine which texture format to convert to on load
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- These 4 bytes have unknown function
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- This is an unsigned integer
- This is usually ignored and assumed to be width * bytes-per-pixel
- All the
**ac
files have 0 for this
- These 4 bytes have unknown function
- This is an unsigned integer
- This indicates the presence of a palette
- All the
**ac
files have 0 for this
- This is an unsigned integer
- This is always 0 for non-paletted images
- All the
**ac
files have 1 for this
- This is an unsigned integer
- The first instance will be used anyways
- All the
**ac
files have 8 for this
- This is ignored on load
- All the
**ac
files have 0 for this
- This is an unsigned integer
- All the
**ac
files have 0 for this
- This is an unsigned integer
- Always use this to determine how much data to read, regardless of the bit depth
- For example, if this is 1, you read 1 byte per pixel
Niema Moshiri 2019