Four-layer ground: tint formula per material #195

Manually merged
github merged 1 commit from gh-pr/195/head into gh-pr/195/base 2026-11-26 20:17:10 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 19:18 UTC · original
holdmysocks:claude/ground-tint → master · +85 −1 · 2 files · 1 commits · merged 2026-11-24 19:36 UTC

What

A four-layer ground material's multilayer block gets tint_formula: the tint as the shader computes it, with this material's switches resolved. The tint is still not applied to the exported textures. The existing tint text stays as it is.

  • steps: the seven steps from layer colour to tinted colour (mask, vertex tint, texture tint, final mix by the vertex colour's alpha).
  • switches: the material's three tint switches (vertex tint on, vertex tint second form, blend amount scaled by the mask).
  • per_layer: the mask (the data map's alpha or its inverse) and its scale, the vertex tint and texture tint modes (multiply, luminance or off), intensities and blend amount.
  • inputs, second_form, source, not_read.

Checked

  • Survey of 203 four-layer materials on 14 tiles: 189 have the switches 1, 0, 1, so one branch covers nearly all.
  • A real export of one tile with this build: 24 of its 33 materials get the block. Each layer comes out with either the texture tint or the vertex tint in use, not both.
  • cargo test -p sixng-core --lib: 179 passed.

Not decoded or not checked

  • Read from the base pixel program of the family, once. The most used variant's program has the same code shape but was not re-read line by line. Medium confidence.
  • Not compared with a rendered image.
  • One more switch beside these (7a090c2a) and the tint's effect on the normal and roughness are not read.
  • Materials of the five variants that get no multilayer block today (56 of the 203 surveyed) get no tint_formula either.
**@⁠holdmysocks** on GitHub · 2026-11-24 19:18 UTC · [original](https://github.com/holdmysocks/SixNG/pull/195) `holdmysocks:claude/ground-tint` → `master` · +85 −1 · 2 files · 1 commits · merged 2026-11-24 19:36 UTC ## What A four-layer ground material's `multilayer` block gets `tint_formula`: the tint as the shader computes it, with this material's switches resolved. The tint is still not applied to the exported textures. The existing `tint` text stays as it is. - `steps`: the seven steps from layer colour to tinted colour (mask, vertex tint, texture tint, final mix by the vertex colour's alpha). - `switches`: the material's three tint switches (vertex tint on, vertex tint second form, blend amount scaled by the mask). - `per_layer`: the mask (the data map's alpha or its inverse) and its scale, the vertex tint and texture tint modes (multiply, luminance or off), intensities and blend amount. - `inputs`, `second_form`, `source`, `not_read`. ## Checked - Survey of 203 four-layer materials on 14 tiles: 189 have the switches 1, 0, 1, so one branch covers nearly all. - A real export of one tile with this build: 24 of its 33 materials get the block. Each layer comes out with either the texture tint or the vertex tint in use, not both. - `cargo test -p sixng-core --lib`: 179 passed. ## Not decoded or not checked - Read from the base pixel program of the family, once. The most used variant's program has the same code shape but was not re-read line by line. Medium confidence. - Not compared with a rendered image. - One more switch beside these (`7a090c2a`) and the tint's effect on the normal and roughness are not read. - Materials of the five variants that get no `multilayer` block today (56 of the 203 surveyed) get no `tint_formula` either.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:17:08 +00:00
github manually merged commit e399c8e8fa into gh-pr/195/base 2026-11-26 20:17:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.