Skip to content

Material and TextureSet

AnvilMaterialsApplies toRRSWS

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 prefixvariable100% known

Little-endian; after the resource identity and class header.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x01u8 = 1managed byteProven
0x110referenceMaterialTemplateProven
0xB10referenceTextureSetProven
0x15102bytesmaterial preludeProvenincludes render flags; individual fields below
0x7B4u32property countProven
0x7FvariableProperty[]propertiesProventhe last property ends the body on all 13,579 entries
Property header16 bytes75% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32keyProvenCRC-32 of the exact property label for all texture properties
0x44u32payload classProven
0x82u16stored zeroUnknownzero on the material census
0xA4u32type selectorProven
0xE2u16stored zeroUnknownzero 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

TextureParameter37 bytes86% known

Starts at the inner repeated class marker; the Material payload also has an eight-byte object identity before it.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32 = 0x7D08460DTextureParameter classProven
0x41u8stored byteUnknown0 in the measured records
0x54u32TextureSpecificationMethodObservedchannel; distinct from the shader texture register
0x94u32MapTypeObservedTextureSet slot
0xD4u32stored wordUnknown0 in the measured records
0x1110referenceset referenceProven
0x1B10referencetexture referenceProven

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

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

Template binding record42 bytes81% known

Local record layout; records are not guaranteed to form a fixed-stride array.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32 = 0x92D220DDShaderParameter markerObserved
0x44u32property keyObserved
0x84u32f1Observed
0xC4u32f2Observed
0x104u32f3Observed
0x144u32f4Observed
0x1810referenceoperator linkObservedalso has a tag-0 stored form
0x228bytesfollowing bytesUnknownzero 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.

What is the exact runtime texture fallback order?

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

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

SKGenericMaterial body (selected fields)647 bytesSWS33% known

Little-endian. Offsets are body offsets; the fields not listed are stored bytes without an established meaning. Slot blocks are described separately below.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x01u8managedObserved
0x14u32idObserved
0x54u32 = 0xB71F6261classProven
0x154u32blendObservedenum; 4 on alpha-blended decals (source alpha, inverse source alpha, no depth write); 6 on glow effects, probably AdditiveAlpha
0x191boolblendedInferred1 on blended surfaces
0x1A1boolalpha testInferred1 on cut-out surfaces
0x1B1u8alpha test referenceInferred119 on the Ministry metro tile decal
0x1C4u32displayUnknown0 on the materials examined
0x241boolTwoSidedObservedproperty hash 0x403525B2 = CRC-32 of the name
0x251boolInvertCullingObservedproperty hash 0x4F892276 = CRC-32 of the name
0x474u32collision surface idObservedwhen nonzero, the id of a collision-surface object (water fountains: Water; debug grids: Concrete, Dirt, ConcreteStairs)
0x4F1u8unknownUnknown1 on 406 distinct materials (characters, vehicles, metro cars, helicopters), 2 on 37 (light paint, smoke scrolls, beams); not read by the sidedness code
0x5B1boolwaterObservedsee water below
0x764u32detail slotObserveda tiled detail map: the fake-reflection ramp, the character skin wrap
0x844u32mask slotObservedGen_Mask_* textures: a grime or tint mask; the slot carries an RGBA tint
0xA816f32[4]layer 1 tintObservedRGBA
0xC033slot blockdiffuse 1Observed
0xE94u32normal mapObservedTextureMapSpec id
0x1094f32HeightScaleObservedproperty hash 0xD963A8E7 = CRC-32 of the name; 1.0 on 788 of 798 materials with a normal map
0x1154u32specular mapObservedTextureMapSpec id
0x14C16f32[4]Layer2_ModulationColorObservedproperty hash 0xC865F2A3 = CRC-32 of the name
0x15C4u32Layer2_UVChannelObserved
0x16833slot blockdiffuse 2Observed
0x1914u32second specular mapObservedTextureMapSpec id
0x1B216f32[4]layer 3 tintObservedRGBA
0x1C24u32Layer3_UVChannelObserved
0x1CE33slot blockdiffuse 3Observed
0x2094u32Diffuse2ObservedTextureMapSpec id
0x20D4u32InfluenceHidePixelModeObservedproperty hash 0x7DACF81C; see influence
0x2194u32generic mapObservedTextureMapSpec id; valid only when the word is an object id
Diffuse slot block33 bytesSWS52% known

Little-endian. Offsets are relative to the block; the block starts at body offset 192, 360 or 462.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32TextureMapSpec idObserved
0x48f32[2]scaleInferredtiling; position inferred from the rotation's position after scale and offset
0xC8f32[2]offsetInferred
0x144f32rotationProvendegrees
0x184u32TexMapMode UObservedenum, wrap or clamp style
0x1C4u32TexMapMode VObservedenum
0x201boolUseTextureAlphaObservedproperty 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

See influence for the material setting that discards a surface in one of the game’s two colour states.