From 83caf4d6abf95b47046e1b3cc8c3203323ee0eff Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 18 Jul 2026 16:52:46 +0400 Subject: feat(terrain): recover material layer contract --- docs/tomes/05-render.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/tomes/05-render.md b/docs/tomes/05-render.md index d1b584f..e75712c 100644 --- a/docs/tomes/05-render.md +++ b/docs/tomes/05-render.md @@ -1550,6 +1550,17 @@ This is evidence for a two-layer terrain-material contract, but not yet for its blend equation, so the Vulkan bridge intentionally remains texture-agnostic until the base/overlay composition is recovered. +Static recovery of `Terrain.dll!CLandscape` now fixes the loader contract behind +that observation. The constructor opens `Land.msh`, creates one material manager +from `Land1.wea`, then invokes that manager's second-table load with `Land2.wea`. +It requires NRes type 18 with the original diagnostic “microtexture mapping +chunk” and retains it as four-byte entries; type 14 is optional. Therefore the +two WEAR selectors must not be collapsed into an invented one-layer material, +and the type-18 `aux18` stream is now documented as microtexture mapping data. +`TerrainFace28::material_layers` exposes the evidenced high-byte `Land1` +selector (with `0xff` absent sentinel) and low-byte `Land2` selector. The +manager's actual blend/pass operation remains unrecovered. + The static Vulkan bridge now carries each contiguous face run as a separate draw range keyed by the original packed `material_tag`; it neither reorders triangles nor collapses the high byte. For the first usable visual layer, the -- cgit v1.2.3