Four-layer ground: where each material's layer weights come from (vertex colours or lookup texture) #187
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!187
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/187/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-24 17:45 UTC · original
holdmysocks:claude/ground-vertex-weights→master· +63 −5 · 3 files · 3 commits · merged 2026-11-24 17:58 UTCWhat
The four-layer ground shader mixes two sources of layer weights: the lookup texture and the second vertex colour set, by that set's alpha (read from the shader code, #161). This PR checks that on real meshes and records the result per material in the export.
multilayer.weights.source:vertex colours,lookup texture, ormixed: per vertex.multilayer.weights.vertex: the attribute (_COLOR1), the vertex count, the share with alpha 1 and with alpha 0, the mean alpha, the share whose r + g + b exceeds 1, and the rule to combine the sources.Measured
14 map tiles re-exported, about 150,000 four-layer vertices:
…_dpm_dm_hbb) and on 58 to 100 % of the other eight variants. 45 of that variant's 47 materials have it at 1 on every vertex.…_spx_dm_hbbvariants 149 of 41,812 vertices exceed it.Checked
vertex colours, fourlookup texture, threemixed: per vertex.cargo test -p sixng-corepasses (new assertions in the four-layer test).Not checked, not done