User:Chipsnapper2/HL2 Xbox Research/Texture Research
Jump to navigation
Jump to search
HL2 Xbox doesn't use VTF files for materials - instead it uses the XTF file format. VTFEdit cannot open these files.
All VMTs are identical to those found in Source 2004 builds of HL2.
XTF header
struct VTFFileBaseHeader_t
{
char fileTypeString[4]; // "VTF" Valve texture file
int version[2]; // version[0].version[1]
int headerSize;
};
#define XTF_MAJOR_VERSION 5
#define XTF_MINOR_VERSION 0
struct XTFFileHeader_t : public VTFFileBaseHeader_t
{
unsigned int flags;
unsigned short width; // actual width
unsigned short height; // actual height
unsigned short depth; // always 1
unsigned short numFrames;
unsigned short preloadDataSize; // exact size of preload data
unsigned short imageDataOffset; // aligned to sector size
Vector reflectivity; // Resides on 16 byte boundary!
float bumpScale;
ImageFormat imageFormat;
unsigned char lowResImageWidth;
unsigned char lowResImageHeight;
unsigned char fallbackImageWidth;
unsigned char fallbackImageHeight;
unsigned char mipSkipCount; // used to resconstruct mapping dimensions
unsigned char pad; // for alignment
};