Terrain materials and splatting
Terrain colour combines a material-ID raster with repeating detail images, altitude ramps, baked far colour and occlusion. TerrainMaterialBank supplies the ordered material list indexed by block 2 of each node. Observed · bank, node loader and shaders
The USNAT bank has nine detail TextureSets, 106 material references representing 105 distinct identities, five region objects and one displacement TextureMap. Its entire body is byte 1 followed by three counted reference arrays and one final reference. Proven · complete bank body
Body offsets, without resource identity/class prefix. Other fields are not fully described here.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 2 | bytes | stored prefix | Unknown | retained |
| 0x2 | 4 | f32 | detail UV scale | Observed | matches runtime material record +44 |
| 0x6 | 4 | f32 | stored scale-like value | Unknown | 1 to 200; not the detail repeat read by the pixel shader |
| 0xA | 7 | bytes | intervening fields | Unknown | includes stored flags; bytes 15 and 16 are zero in the reader profile |
| 0x11 | 8 | u64 | detail TextureSet identity | Observed | |
| 0xA2 | 4 | f32 | Roughness | Observed | |
| 0xA6 | 4 | f32 | SpecularOcclusion | Observed | |
| 0xB4 | 10 | reference | CollisionMaterial | Observed | |
| 0xC6 | 4 | u32 | bank position | Observed |
The pixel shader’s per-material buffer has 68-byte records; flags at +40, detail scale at +44, inverse scale at +48, slope-normal strength at +52 and slope-normal slice at +56 match the corresponding source material fields. Detail repetition is globalFactor × materialScale; the source f32 at body +6 is not read as a repeat distance in this record. Observed · 104 runtime/source record matches
TerrainProceduralSetBank references 132 procedural sets. TerrainProceduralMaterial contains three TerrainMaterial references and no vegetation reference in the 479 examined bodies; procedural terrain recipes therefore are not stored tree or grass position lists. Proven · all 479 procedural-material bodies
Near colour and normal
Section titled “Near colour and normal”The live splat path jitters the material lookup by noise, selects four neighbouring material texels and blends with a per-axis sigmoid 1/(1+exp(k*(.5-abs(f)))). Detail textures come from each material’s TextureSet slots 0, 1 and 7: diffuse, packed normal and mask. The same weights blend diffuse and packed normal XY. Observed · terrain pixel program and interpreted ablations
Height differences supply the geometric normal: normalize(((hLeft-hRight)*5000, (hDown-hUp)*5000, 1)) for neighbours .5 metres away. Reconstructed detail normals enter its frame; flat ground maps normal texture green toward world −y. Near-flat parts can flatten toward world up through material and mask controls. Observed · shader arithmetic and ablations
Material rotation flags alter both detail UVs and normal XY. Flag bit 2 introduces a 4-metre checkerboard and 8-metre bands from integer tile-cell bits; the same transform must act on the normal frame to describe the program’s result. Observed · executed terrain program
The node loader builds t18.R/G from material Roughness/SpecularOcclusion times 255, t18.B from block 7, and t18.A as zero. Block 5 is grass-group data, not t18.B. Observed · loader and all 105 material bodies
Region ramps and distance
Section titled “Region ramps and distance”The five region objects each contain a TextureSet reference and two altitude endpoints. Their TextureSet slot 0 supplies a 1×2048 colour/alpha ramp. The runtime region buffer holds (low,1/(high-low)). Observed · stored objects and runtime record match
| Region | Altitude interval, metres | Confidence |
|---|---|---|
| BryceCanyon | 1500–3000 | Observed |
| CanyonLand | 500–1500 | Observed |
| Rampage | 1000–2000 | Observed |
| TheWave | 1000–1500 | Observed |
| Zion | 1000–2500 | Observed |
Block-3’s low nibble chooses region 1–5; zero disables the ramp. Ramp coordinate is sat((height-low)/(high-low)), and ramp alpha controls colour interpolation, sometimes weighted by mask blue. The final occlusion factor includes 0.5+block8. Far colour comes from block 1 rather than reevaluating all near detail. Observed · program and material records
Virtual texturing and steep surfaces
Section titled “Virtual texturing and steep surfaces”The flat VT producer writes detail colour, packed detail normal, displacement and masks. Drawing shaders apply region ramps, occlusion and distance behaviour afterward. A world-memory sample has VT render-graph objects and all 125 examined per-node constant blocks carry VT fields, supporting a running VT path; exact draw selection is not captured. Observed · snapshot and program comparisons
Flat, mixed and unclassified non-VT programs give identical outputs on three sampled crops at three distance states. Vertical programs instead sample two vertical world-space planes with azimuth-dependent weights and transform detail normals in the plane frame. Vertical triangles retain live splatting even in the VT family. Observed · interpreted comparisons and VT disassembly
The MAD_Raw_TerrainBlend pixel program reads the virtual terrain cache from engine-bound registers the material does not
store: integer 3-D page tables at t50 and t51, the t51 lookup validating a page before the atlas samples, and detail colour
and normal caches at t45 and t46. t48 and t49 are further atlases sampled at the same page coordinates and derivatives as
t45 and t46, giving two and three channels, so they belong to the terrain cache and not to lighting; what those channels
hold is not established. Observed[disassembly of one compiled
program]{games=“riders-republic”} The lower registers hold the terrain’s tile data: page addresses (t13), page levels (t14),
the height atlas (t15), integer sediment metadata (t16), the colour atlas (t17), material properties (t18), occlusion
(t19) and a sediment array (t20). Inferred · RR
The CPU’s geometric split into flat/mixed/vertical triangle lists is unresolved. The vertex varying sometimes called flatness instead blends material flag bit 4, and is not a slope measurement. Observed · vertex arithmetic Unknown · triangle classifier
The global detail scale, sigmoid sharpness, VT texel density, final triangle-class rule, tessellation selection and full displacement response are not all established from runtime state. A numerically executed shader with selected constants does not establish those constants as the game’s settings. Unknown