Skip to content

TextureMap and CompiledMip

AnvilTexturesApplies toRRGRBSWS

A TextureMap describes an image and its mip chain. Larger levels can live in separate CompiledMip resources, while smaller levels remain in the parent body. Observed · RR Breakpoint also uses TextureMaps and TextureSets, supports separately stored high-resolution mips and uses unswizzled PC textures. These community descriptions do not establish the Riders Republic byte offsets for Breakpoint. Sourced · GRB · GRB modding reference

only in SWS

A Shaun White Skateboarding texture is one TextureMap object that holds its whole mip chain inline: there are no separate high-resolution mip resources. A CompiledTextureMap is embedded in the same body. Width, height, depth, format, dimension, gamma, mip count and the address and filter modes are stored twice, once before the pixels and once after them, and the two copies agree. A strict reading of every one of the 40,851 TextureMaps of the 33 data forges of the PC build reads the body below to its exact end, with the two copies equal on every texture. Proven · SWS[every TextureMap of the install]

TextureMap body (Shaun White Skateboarding)93 + P + 56SWS97% known

Little-endian. Body offsets, with the managed byte at 0. The body ends with the compiled copy on all 40,851 TextureMaps of the install.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x01u8 = 1managedProven1 on every TextureMap
0x14u32idProventhe object's id in its entry's directory
0x54u32 = 0xA2B7E917classProvenCRC-32 of TextureMap
0x94u32widthProvenlevel 0's width; the game creates its texture with it
0xD4u32heightProvenlevel 0's height
0x114u32 = 1depthObserved1 on every TextureMap; no volume texture is stored
0x154u32pixel formatProvencodes 0, 2, 3, 4, 5 and 12 occur; see the format codes page
0x194u32dimensionProven1 flat, 2 cube (created as a cube texture); only these occur
0x1D4u32gammaObserved0 linear, 1 sRGB; both are created with the same Direct3D format
0x214u32mip countProvenlevels per face; 0 means one level
0x2512u32[3]address U, V, WObserved
0x3112u32[3]magnification, minification and mip filtersObserved
0x3D4u32map typeObserved
0x414u32categoryObserved
0x453u8[3]flagsUnknownthe first byte takes the values 0, 1, 2, 4 and 5
0x484u32user categoryObserved
0x4C1u8 = 0compiled pointerProven0 on every TextureMap: the compiled object follows inline
0x4D4u32compiled idProventhe inline CompiledTextureMap's id
0x514u32 = 0x13237FE9compiled classProvenCRC-32 of CompiledTextureMap
0x554u32pixel byte length PProven
0x59PbytespixelsProvenlevels largest first; a cube map holds six complete chains face by face, in Direct3D's +X, -X, +Y, -Y, +Z, -Z order
89+P4u32 = 2platformProven2 on every TextureMap
93+P4u32 = 32SDK versionProven32 on every TextureMap
97+P52u32[13]compiled copyProvenwidth, height, depth, mip count, format, dimension, gamma, address U V W and the three filters again, equal to the fields above on every TextureMap

Each level is its format’s size for its dimensions (blocks round each axis up to four texels), and the levels of every TextureMap of the install fill its pixels exactly, with no byte before, between or after them. Proven · SWS[every TextureMap of the install]

The game uploads each level’s stored bytes unchanged. On the game’s own loader and renderer run from a new game to the start of the level-02 load, each of the 6,024 levels of the 1,037 TextureMaps it created a texture from was copied into the texture’s locked level byte for byte, at the same face and mip, with the width and height above; no texture is converted, swizzled or re-encoded on the way. Observed · SWS[every texture the game loaded on that route]

The texture reached from a material is a TextureMapSpec object whose last u32 is the TextureMap id. Observed

The 40,851 TextureMaps of the install comprise 21,402 of code 2, 401 of code 3, 2,126 of code 4, 14,931 of code 5, 1,981 of code 12 and 10 of code 0; 330 of them are cube maps (100 of code 2, 99 of code 4, 131 of code 5). Proven · SWS[every TextureMap of the install] The 13,019 mip levels of level 01 and the extra forge decode to the same pixels as an independent block decoder. Observed · level 01 and the extra forge

Graphical interface textures keep their rows upside down. The loading screens of the extra forge are 1280 by 720 block-compressed images stored this way. Observed

The complete six-forge header/body census reads 46,338 TextureMaps to their exact body end and refuses 27 of the 46,365 entries. The proven framing below applies to those 46,338 accepted bodies, not to every codec or every mip-chain interpretation. Proven · RR · 46,338 read; 27 refused

TextureMap body header51 bytesRR73% known

Little-endian; excludes the resource identity and class prefix.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x01u8 = 1managed byteProven
0x14u32widthProven
0x54u32heightProven
0x94u32depthProven
0xD4u32array sizeProven
0x114u32format codeProven
0x154u32dimensionProven1 flat; 2 cube; 3 volume
0x194u32transfer flagObserved0 linear; 1 requests sRGB treatment for supporting formats
0x1D4u32mip countProvenzero is a single-level image in 15 measured maps
0x2114bytesremaining header fieldsUnknownretained; meanings not assigned here
0x2F4u32external mip count rProven

The external list uses nine bytes per mip: zero tag byte and u64 identity. The compiled header follows another nine bytes, beginning at 60+9r. This list uses a different envelope from the ten-byte references inside Materials. Proven · RR · 46,338 read; 27 refused

The 60-byte compiled header starts with 0x13237FE9 (CompiledTextureMap), u32 1, then width, height, depth, array size, mip count, format, dimension and transfer flag. Sixteen more bytes precede its pixel-byte length. The metadata repeats the outer header, and the held pixel span closes the resource body. Proven · RR · 46,338 read; 27 refused

Held levels run largest first from level r to the last mip. Width and height halve per level with a minimum of one. A block-compressed flat level occupies ceil(width/4)*ceil(height/4)*blockBytes; uncompressed levels occupy width*height*pixelBytes. Two maps declare two mips while their pixels hold a complete ten-level chain, so the declared count alone does not always describe the held bytes. Observed · RR · measured map framing and storage census

RRAssetStudio’s PNG export is flipped vertically against the stored texel order. On the TerrainMaterials detail maps, the correlation between a normal map’s green channel and its height map’s row gradient is −0.21 and −0.31 on the exported PNGs and +0.18 and +0.30 decoded in stored order, while red is unchanged. Comparisons that depend on rows (normal green, UV v, atlas rows, terrain rasters) need the two orders reconciled first. Observed · RR · TerrainMaterials detail maps

CompiledMip bodyvariableRR100% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x01u8 = 1managed byteObserved
0x14u32image byte length nObserved
0x5nbytesimageObserved
5+n1u8stored byteUnknown0 in the four original fixtures
6+n8u64parent TextureMap identityObserved
14+n4u32mip levelObserved

The parent and level fields distinguish an image’s external mips from another image’s data. Four original fixtures comprise three level-0 mips and one level-1 mip, each with exact body closure; a sampled BC7 parent names levels 0 and 1 whose sizes match its missing levels. Observed · RR

Each mip contains its layers consecutively. The measured storage uses the header’s depth × array size × six faces for a cube at each held level; these byte counts account exactly for all 25 cube and volume maps in the examined install. This is the measured file layout, independently of a graphics API’s volume-mip convention. Proven · RR · 25 layered maps’ lengths

Seventeen BC6H environment cubemaps are 512×512×6 and belong to WorldAmbiance looks. The complete face orientation is a separate question from the established layer byte counts. Observed · RR

Two debug-font maps end after an external-reference count of zero and a lone null tag 3, without a compiled image. They are image-less stored resources rather than truncated mip chains. Runtime generation is the interpretation given by their debug-font use. Observed · RR · stored form Inferred · RR · generation

See format codes for codecs and the transfer flag’s format-specific limits.

Which image-less and layered profiles exist beyond these samples?

The sampled layered lengths establish storage, not every cube-face orientation or runtime-generated image producer. Unknown · RR