Four-layer ground: describe all 18 variants #197

Manually merged
github merged 4 commits from gh-pr/197/head into gh-pr/197/base 2026-11-26 20:17:21 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 19:47 UTC · original
holdmysocks:claude/ground-variants → master · +123 −15 · 2 files · 4 commits · merged 2026-11-24 20:06 UTC

The four-layer ground shader has 18 variants. The export described the layers of four of them; ground materials using any other variant got no multilayer block and the class opaque. Five of those other variants are in use on the 14 map tiles surveyed.

What changes

  • All 18 variants get the multilayer block (family: "four_layer") and the class terrain_multilayer.
  • New multilayer.variant: the shader's name, what was checked for it, how the height blend applies to it, what its program does differently, and a confidence (medium or low).
  • The uv3 variant that was already described (27e5c49d) now names TEXCOORD_1 as its second layer UV set, not TEXCOORD_2.

What was checked

  • All 18 variants have the same 17 texture slots in the shader tables. A test checks the 18 hashes against the names.
  • For the nine variants found on the surveyed tiles, each variant's own main pixel program was compared with the one read in full: the same layer UV selection, tint code and height-blend code are present.
  • Layer UV selection is the same code with and without uv3: the per-layer pick constant chooses the first or the second UV input.
  • The second input is taken to be TEXCOORD_1 from UV density: 3 to 6 m per unit on every variant over 14 tiles (TEXCOORD_0 x 128 is 4 m), while TEXCOORD_2 is 40 to 100 m per unit.
  • Unit tests pass. Three tiles re-exported: all 67 ground materials on them now have the block, the tint formula from PR 195 and a variant entry.

Not decoded

  • The mesh programs could not be read, so which mesh stream feeds each UV input is from density, not code (medium confidence).
  • What the third UV set of uv3 meshes is used for. The uv3 programs take a second tangent frame; its use was not traced.
  • The extra textures and samples of the dfm, pxm and spx variants.
  • Whether the height blend is always on in variants without the per-layer switch constant.
  • Nine variants (the base shader, dfm_dm_hbb, hbo, mud, pxm without height blend, and their uv3 forms) were on no surveyed tile: only their tables were compared, and their description is by analogy (low confidence).
  • Nothing was compared with a rendered game image.
**@⁠holdmysocks** on GitHub · 2026-11-24 19:47 UTC · [original](https://github.com/holdmysocks/SixNG/pull/197) `holdmysocks:claude/ground-variants` → `master` · +123 −15 · 2 files · 4 commits · merged 2026-11-24 20:06 UTC The four-layer ground shader has 18 variants. The export described the layers of four of them; ground materials using any other variant got no `multilayer` block and the class `opaque`. Five of those other variants are in use on the 14 map tiles surveyed. ## What changes - All 18 variants get the `multilayer` block (`family: "four_layer"`) and the class `terrain_multilayer`. - New `multilayer.variant`: the shader's name, what was checked for it, how the height blend applies to it, what its program does differently, and a confidence (medium or low). - The `uv3` variant that was already described (27e5c49d) now names TEXCOORD_1 as its second layer UV set, not TEXCOORD_2. ## What was checked - All 18 variants have the same 17 texture slots in the shader tables. A test checks the 18 hashes against the names. - For the nine variants found on the surveyed tiles, each variant's own main pixel program was compared with the one read in full: the same layer UV selection, tint code and height-blend code are present. - Layer UV selection is the same code with and without `uv3`: the per-layer pick constant chooses the first or the second UV input. - The second input is taken to be TEXCOORD_1 from UV density: 3 to 6 m per unit on every variant over 14 tiles (TEXCOORD_0 x 128 is 4 m), while TEXCOORD_2 is 40 to 100 m per unit. - Unit tests pass. Three tiles re-exported: all 67 ground materials on them now have the block, the tint formula from PR 195 and a `variant` entry. ## Not decoded - The mesh programs could not be read, so which mesh stream feeds each UV input is from density, not code (medium confidence). - What the third UV set of `uv3` meshes is used for. The `uv3` programs take a second tangent frame; its use was not traced. - The extra textures and samples of the `dfm`, `pxm` and `spx` variants. - Whether the height blend is always on in variants without the per-layer switch constant. - Nine variants (the base shader, `dfm_dm_hbb`, `hbo`, `mud`, `pxm` without height blend, and their `uv3` forms) were on no surveyed tile: only their tables were compared, and their description is by analogy (low confidence). - Nothing was compared with a rendered game image.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:17:18 +00:00
github manually merged commit 32736701bb into gh-pr/197/base 2026-11-26 20:17:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.