Material and TextureSet
A Material links a shader template to a TextureSet and overrides typed properties. A TextureSet supplies an ordered table of 19 texture references. The binding index in a shader is different from the TextureSet slot used to resolve its image. Proven · 13,579 Materials and 10,027 TextureSets, including patch copies
Material body
Section titled “Material body”Little-endian; after the resource identity and class header.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 1 | u8 = 1 | managed byte | Proven | |
| 0x1 | 10 | reference | MaterialTemplate | Proven | |
| 0xB | 10 | reference | TextureSet | Proven | |
| 0x15 | 102 | bytes | material prelude | Proven | includes render flags; individual fields below |
| 0x7B | 4 | u32 | property count | Proven | |
| 0x7F | variable | Property[] | properties | Proven | the last property ends the body on all 13,579 entries |
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 4 | u32 | key | Proven | CRC-32 of the exact property label for all texture properties |
| 0x4 | 4 | u32 | payload class | Proven | |
| 0x8 | 2 | u16 | stored zero | Unknown | zero on the material census |
| 0xA | 4 | u32 | type selector | Proven | |
| 0xE | 2 | u16 | stored zero | Unknown | zero on the material census |
| Class / selector | Payload | Confidence |
|---|---|---|
| 0 / 7 | i32, 4 bytes | Proven |
| 0 / 10 | f32, 4 bytes | Proven |
| 0 / 13 | float4, 16 bytes | Proven |
0x7D08460D / 19 |
45 bytes: object identity, repeated class, TextureParameter fields | Proven |
0xC52E2125 / 19 |
47 bytes: identity, repeated class, eight floats, three bytes | Proven |
0xECE5D96C / 19 |
36 bytes: identity, repeated class, six floats | Proven |
0xBC0F16F5 / 19 |
45 bytes: identity, repeated class, 33 uninterpreted bytes | Proven · framing |
The property framing accounts for every byte of all 13,579 stored Materials and agrees with an independent reader. A typed payload’s framing does not establish the meaning of every value in it. Proven
Texture selectors and defaults
Section titled “Texture selectors and defaults”Starts at the inner repeated class marker; the Material payload also has an eight-byte object identity before it.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 4 | u32 = 0x7D08460D | TextureParameter class | Proven | |
| 0x4 | 1 | u8 | stored byte | Unknown | 0 in the measured records |
| 0x5 | 4 | u32 | TextureSpecificationMethod | Observed | channel; distinct from the shader texture register |
| 0x9 | 4 | u32 | MapType | Observed | TextureSet slot |
| 0xD | 4 | u32 | stored word | Unknown | 0 in the measured records |
| 0x11 | 10 | reference | set reference | Proven | |
| 0x1B | 10 | reference | texture reference | Proven |
Template binding records link graph operators. TextureObject operators contain a TextureSelector and SamplerMode; constant operators contain default scalar, integer or vector values; UVTransformOperator contains the default transform. Reading every binding’s operator across all templates establishes the stored defaults, independently of whether a Material supplies an override. Proven · all template operators
The custom texture operator 0x1181BD58 also carries a selector. All 36 such operator objects across 14 template names identify their custom definition as TextureObject. Waterfall’s height-map selector and the cactus normal-map selector agree with the corresponding TextureSet entries. Treating it as a texture fetch is supported by these joins; the engine’s complete resolution routine is not established. Proven · all 36 stored custom operators Observed · two selector/content controls Inferred · custom resolution
A data-based resolution model uses a Material property first, the Material’s set slot for channel 0 next, then the template’s default image for channels 1 or 2. Generic Texture labels require the selector’s slot/channel as well as the label hash. Null overrides and the engine’s final substitute for an unfilled mask remain unresolved; a white mask is consistent with authored tints and AO settings but is not an observed runtime binding. Inferred
Template descriptors and labels
Section titled “Template descriptors and labels”A property descriptor consists of eight zero bytes, class 0xD933DB50, a link tag, u64 linked identity, u32 discriminator, three strings, then two counted string lists. Strings are a u32 byte length followed by those bytes and one zero terminator only when nonempty. Descriptor runs have a preceding count. Proven · 6,762 descriptors in 416 nonempty template entries
The second string is the exact property label. Every one of the 35,918 Material texture records matches its key to the CRC-32 of that string in its referenced template; there are 125 distinct matched labels and no unresolved keys or distinct-byte collisions among those matches. CRC-32 covers the exact ASCII bytes, excluding length and NUL, with reflected polynomial 0xEDB88320 and all-ones initial/final XOR. Proven · all stored texture properties
The complete texture-label vocabulary lists every matched label, key and stored occurrence count.
| Exact label | Key | Confidence |
|---|---|---|
1 - Diffuse Alpha |
0xE4B6CC48 |
Proven |
1 - Diffuse Alpha , with a trailing space |
0x918FB02B |
Proven |
2 - Normal Map |
0x443BF980 |
Proven |
1 - Albedo (RGB) + Opacity (A) |
0x463E0755 |
Proven |
Texture |
0x4DDB34EE |
Proven · complete label join |
Of all 432 stored template entries, sixteen have an empty descriptor run rather than a nonempty marker run. They include default/error templates, video, snow-trail, vertex-colour display and FakeForest families. Descriptor counts do not bound binding-record counts. Proven · all 432 template entries
Local record layout; records are not guaranteed to form a fixed-stride array.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 4 | u32 = 0x92D220DD | ShaderParameter marker | Observed | |
| 0x4 | 4 | u32 | property key | Observed | |
| 0x8 | 4 | u32 | f1 | Observed | |
| 0xC | 4 | u32 | f2 | Observed | |
| 0x10 | 4 | u32 | f3 | Observed | |
| 0x14 | 4 | u32 | f4 | Observed | |
| 0x18 | 10 | reference | operator link | Observed | also has a tag-0 stored form |
| 0x22 | 8 | bytes | following bytes | Unknown | zero in the initially measured records; one measured inter-record gap is longer |
(f3,f4) |
Binding | Confidence |
|---|---|---|
(0,3) |
Texture register t(75+f1) |
Proven · shader execution in covered families |
(1,0) |
Scalar at cb3[f2].x |
Proven · shader execution in covered families |
(1,2) |
Vector at cb3[f2] |
Proven · shader execution in covered families |
(3,6) |
UV matrix starting at cb3[f2]; shaders use the first two rows on (u,v,1) |
Proven · shader execution in covered families |
See surface formulas for what the texture channels and constants compute. The render-state page describes the prelude flags; UV transforms distinguishes measured matrix forms from unresolved composition and animation rules.
The stored selector and defaults are established. The complete runtime precedence, null-override treatment and unfilled-slot substitute have not been established from the engine’s binding code. Unknown
Shaun White Skateboarding
Section titled “Shaun White Skateboarding”only in SWS
Every drawn surface of Shaun White Skateboarding uses the material class SKGenericMaterial (0xB71F6261). It holds its texture references and colour controls inline in one fixed-size body: 647 bytes in each of the 3,843 material objects of level 01. Textures are reached through TextureMapSpec objects, whose last u32 (offset 28 of its 32-byte body) is the id of a TextureMap in the same cell. Observed · SWS[level 01]
The size is not the same everywhere: of the 3,024 material objects the game loads from start-up into level 02, 3,023 have the 647-byte body and one has a body of 663 bytes, in an object of 697 bytes. Observed · SWS[the objects of one run into level 02] What the 16 further bytes hold is not established. Unknown · SWS
A material class has no shader-template id and no template descriptor: which program draws a surface follows from the combination of stored slots and switches, resolved by the SDB2 shader bundles the game ships. Observed
Little-endian. Offsets are body offsets; the fields not listed are stored bytes without an established meaning. Slot blocks are described separately below.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 1 | u8 | managed | Observed | |
| 0x1 | 4 | u32 | id | Observed | |
| 0x5 | 4 | u32 = 0xB71F6261 | class | Proven | |
| 0x15 | 4 | u32 | blend | Observed | enum; 4 on alpha-blended decals (source alpha, inverse source alpha, no depth write); 6 on glow effects, probably AdditiveAlpha |
| 0x19 | 1 | bool | blended | Inferred | 1 on blended surfaces |
| 0x1A | 1 | bool | alpha test | Inferred | 1 on cut-out surfaces |
| 0x1B | 1 | u8 | alpha test reference | Inferred | 119 on the Ministry metro tile decal |
| 0x1C | 4 | u32 | display | Unknown | 0 on the materials examined |
| 0x24 | 1 | bool | TwoSided | Observed | property hash 0x403525B2 = CRC-32 of the name |
| 0x25 | 1 | bool | InvertCulling | Observed | property hash 0x4F892276 = CRC-32 of the name |
| 0x47 | 4 | u32 | collision surface id | Observed | when nonzero, the id of a collision-surface object (water fountains: Water; debug grids: Concrete, Dirt, ConcreteStairs) |
| 0x4F | 1 | u8 | unknown | Unknown | 1 on 406 distinct materials (characters, vehicles, metro cars, helicopters), 2 on 37 (light paint, smoke scrolls, beams); not read by the sidedness code |
| 0x5B | 1 | bool | water | Observed | see water below |
| 0x76 | 4 | u32 | detail slot | Observed | a tiled detail map: the fake-reflection ramp, the character skin wrap |
| 0x84 | 4 | u32 | mask slot | Observed | Gen_Mask_* textures: a grime or tint mask; the slot carries an RGBA tint |
| 0xA8 | 16 | f32[4] | layer 1 tint | Observed | RGBA |
| 0xC0 | 33 | slot block | diffuse 1 | Observed | |
| 0xE9 | 4 | u32 | normal map | Observed | TextureMapSpec id |
| 0x109 | 4 | f32 | HeightScale | Observed | property hash 0xD963A8E7 = CRC-32 of the name; 1.0 on 788 of 798 materials with a normal map |
| 0x115 | 4 | u32 | specular map | Observed | TextureMapSpec id |
| 0x14C | 16 | f32[4] | Layer2_ModulationColor | Observed | property hash 0xC865F2A3 = CRC-32 of the name |
| 0x15C | 4 | u32 | Layer2_UVChannel | Observed | |
| 0x168 | 33 | slot block | diffuse 2 | Observed | |
| 0x191 | 4 | u32 | second specular map | Observed | TextureMapSpec id |
| 0x1B2 | 16 | f32[4] | layer 3 tint | Observed | RGBA |
| 0x1C2 | 4 | u32 | Layer3_UVChannel | Observed | |
| 0x1CE | 33 | slot block | diffuse 3 | Observed | |
| 0x209 | 4 | u32 | Diffuse2 | Observed | TextureMapSpec id |
| 0x20D | 4 | u32 | InfluenceHidePixelMode | Observed | property hash 0x7DACF81C; see influence |
| 0x219 | 4 | u32 | generic map | Observed | TextureMapSpec id; valid only when the word is an object id |
Little-endian. Offsets are relative to the block; the block starts at body offset 192, 360 or 462.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 4 | u32 | TextureMapSpec id | Observed | |
| 0x4 | 8 | f32[2] | scale | Inferred | tiling; position inferred from the rotation's position after scale and offset |
| 0xC | 8 | f32[2] | offset | Inferred | |
| 0x14 | 4 | f32 | rotation | Proven | degrees |
| 0x18 | 4 | u32 | TexMapMode U | Observed | enum, wrap or clamp style |
| 0x1C | 4 | u32 | TexMapMode V | Observed | enum |
| 0x20 | 1 | bool | UseTextureAlpha | Observed | property hash 0xA94D8B5D; the layer's sampled alpha weights its blend |
The second diffuse layer’s UseTextureAlpha flag lies at body offset 392 and the third’s at 494, the same 32 bytes after the start of their blocks. Observed
The meaning of the TexMapMode enum values, of the display word at 28 and of the bytes between the listed fields is not established. Unknown
Byte 91 is a strict boolean. Over the 1,971 distinct fixed-size materials of the six levels it is set on exactly six: WaterPort, WaterPool and WaterToxic01 of level 01, the ocean and pirate-ship water of level 03 and ReservoireWater01 of level 04. The other 1,965 store 0, including water-named tanks, foam, fountains and effect sheets. All six set materials have a normal map, a specular map and a cube reflection and no diffuse map. No shader-template id and no water animation semantic is stored. Observed · SWS[all six levels]
The tint of the harbour water at offset 168 is (41, 60, 71) of 255 with alpha 1. Observed
Materials that hide pixels
Section titled “Materials that hide pixels”See influence for the material setting that discards a surface in one of the game’s two colour states.