Texture Data#
The remainder of the file, after the header and metadata, is texture data. The format and size of this texture data can be found in the header.
Uncompressed Texture Data Structure#
The uncompressed texture data is laid out as follows:
for each MIP-Map Level in MIP-Map Count
for each Surface in Num. Surfaces
for each Face in Num. Faces
for each Slice in Depth
for each Row in Height
for each Pixel in Width
Byte data[Size_Based_On_PixelFormat]
end
end
end
end
end
end
Compressed Texture Data Structure#
All compressed data formats have a “minimum width/height”, which is the lowest number of pixels that can be represented by any given region in a compressed image.
The compressed texture data is laid out as follows:
for each MIP-Map Level in MIP-Map Count
for each Surface in Num. Surfaces
for each Face in Num. Faces
for each Region by aligned Depth (Based_On_PixelFormat)
for each Region by aligned Height (Based_On_PixelFormat)
for each Region by aligned Width (Based_On_PixelFormat)
Byte data[Size_Based_On_PixelFormat]
end
end
end
end
end
end