Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WildStar
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WildStar:TEX file
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{dev/uiaddon}} A '''TEX file''' is a texture file format used to store images for the game [[wildstarwiki:WildStar|WildStar]], and is fairly similar to other game texture file formats using DXT compression.__TOC__ The TEX file structure consists of a constant size header, and then a number of pre-rendered 'mipmaps', stored smallest to largest, and all in the same format. Texture sizes must be powers of two, with a smallest dimension size of 4, though the two dimensions do not have to be equal; 512x256 is valid, but 512x200 is not. The first mipmap ('mipmap' level 0) is the smallest pre-rendered image; and each subsequent mipmap basically doubles both dimensions. The final 'mipmap' is the full-size image with the size denoted in the header. == Structure == === TEX version 1 header === struct tex1header { uint8_t ident[4]; // "XFG\0" magic number (GFX) uint32_t type; // always type 0 uint32_t width; // width in pixels, power of 2 uint32_t height; // height in pixels, power of 2 uint32_t unk1; // depth uint32_t unk2; // sides uint32_t mips; // count of stored mipmaps uint32_t format; // 0,1 = uncomp, 13 = dxt1, 14 = dxt3, 15 = dxt5 } tex1header; ==== Notes ==== * The actual number of 'mip' levels determined by the 'mips' field * For '''WildStar''' the 'type' should always be 0. * Some images do not contain the full compliment of pre-rendered mips, many only 1. * Each mip is stored in the same format, denoted by 'format'. * Format 0 and 1 'uncompressed' is stored canonical A8R8G8B8, which is essentially uncompressed 24-bit color with 8-bit alpha. * The header always fixed size 32-byte, and has no special data sections. == Compression == DXT1, DXT3, DXT5 or Uncompressed 8-bit per channel ARGB. === Uncompressed === If 'format' is 1 or 2, each mipmap contains plain 32-bit BGRA data. === DXTC compression === DXT is an industry standard texture compression format, designed originally for efficiency in real time graphics rendering and decompression in hardware. Most current 3D hardware supports loading some form of DXTC data directly. See [[Wikipedia:S3TC|Wikipedia's entry on DXT compression]] for more detail. If 'format' is 13, 14, or 15, each mipmap is composed of 4×4 blocks of pixels. The blocks and the pixels within each block are ordered from left to right, top to bottom. ==== DXT1 ==== If 'format' is 13, then DXT1 compression is used. Each block is 64 bits and begins with two 16 bit values, and are used to derived a 4 color palette. The values are interpreted as 565 RGB colors, with the least significant bits corresponding to blue, to create the first two colors in the palette. ==== DXT3 ==== If 'format' is 14, then DXT3 compression is used. Each block is 128 bits and begins identically to DXT1, except that no special color is reserved in the palette. It is followed by 16 4-bit values corresponding to the alpha values for each of the pixels in the block. ==== DXT5 ==== If 'format' is 15, then DXT5 compression is used. Each block is 128 bits and begins with two 8-bit values to create an 8 element lookup table for alpha values. The first two elements in the lookup table are copies of those values. If the first value is less than or equal to the second, the final two entries of the lookup table are reserved for transparent and opaque. The remaining entries are created by interpolating between the first two entries in the lookup table. The next 48 bits make up 16 3-bit values acting as lookups specifying the alpha values for each of the pixels in the block. The remaining 64 bits are identical to DXT1, except that no special color is reserved in the palette. == Tools == * [[\Houston]] - the client AddOn editor that comes with WildStar can view TEX files * various third party tools == See Also == * [[Wikipedia:S3TC|Wikipedia's entry on DXT compression]]
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Crumb
(
edit
)
Template:Crumbtext
(
edit
)
Template:Dev/uiaddon
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:WildStar/devnav
(
edit
)