You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOT in the file header, this describes the format found in most games that specify extra data size 0xC (12) to 0x14 (16)
enumg1t_colorspace_t : uint8_t {
G1T_COLORSPACE_LINEAR=0,
G1T_COLORSPACE_SRGB=1
}
structextra_data_t {
uint32_tsize; // 12, 16, or 20.floatunk1; // assumption is depth, usually 0. some have it set to between 0.5 and 10.uint8_tunk2;
uint8_tunk3;
uint8_tunk4;
g1t_colorspace_tcolorspace; // bit flag?// if size >= 16int32_tex_width; // if width is large enough to overflow bits in bit packing// if size >= 20int32_tex_height; // if height is large enough to overflow bits in bit packing
};
the colorspace byte is used to determine if the surface is decoded in linear or sRGB colorspace.
The text was updated successfully, but these errors were encountered:
If we treat the data right after the depth as a 32-bit word in big-endian format (it always seems to be big endian), then we have:
bit 0: Seems to be a marker for textures that are being directly mapped to a surface (for instance normal maps or overlays will not have this flag set). As far as I could see, the SRGB flag is part of the main flags from the common texture header, and not the extended data. But since this is still guesswork, I can't be completely positive on this.
bits 16-21 / 28-31: These contain the number of textures for a texture array (DirectX 10 or later). Bits 28-31 are the low part and 16-21 are the high part. For instance a texture with 128 (= 0x80) frames (yes, I have seen one of those) would have 0x0008xxxx and a texture with 2 frames would have 0x2000xxxx. You can find a textures with multiple frames in Blue Reflection: Second Light in the pc000_scl model for instance. I am not sure if bits 22-27 are also meant to be used for texture array dimensions, or for something else.
NOT in the file header, this describes the format found in most games that specify extra data size 0xC (12) to 0x14 (16)
the colorspace byte is used to determine if the surface is decoded in linear or sRGB colorspace.
The text was updated successfully, but these errors were encountered: