Materials: tint-mask layers of a preset's sub-materials #115
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!115
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/115/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 04:13 UTC · original
holdmysocks:claude/tint-mask-layers→master· +178 −20 · 5 files · 3 commits · merged 2026-11-24 04:20 UTCStacked on #114 (its commits show here until it merges).
What this adds
matlib::Library::layers(preset, sub): the tint-mask layers of a sub-material, each with its mask texture (tintmaskmap[L]), tint (tintmasktint[L], and[4 + L]for the second colour set), opacity, flag word with the invert bit, and the mask's UV scale, rotation and translation. Values are the preset's for the sub-material, else its base material's. Only layers with a mask texture and a non-zero opacity are returned.sixng materials --preset <hex>prints them astint_mask_layers.tintmasktranslation(b3643800).Where the composition comes from
Read from the clothing pixel shader (
PS_DeferredPedTexturedNC, the layer loop after the base gradient) and matched to the block builder's stores:The four masks are sampled on the tiling UV input (the one the tile texture uses), each through its own 2x3 transform; the builder fills four mask texture indices, four transforms, four opacities and flag words and 2 x 4 expanded colour triples per sub-material.
What was checked
cargo test -p sixng-core: 148 passed (the matlib test now covers preset-over-base fallback, the invert bit and the opacity filter).tintmaskflagsvalues in the data: 8 (2,640), 0 (1,148), 12 (650) and rarer ones; only bit 2 is interpreted.What is not done / not known
tintmaskmapentry, the roughness / metallic / height / emissive side of a layer, and the pattern, stitch, dirt and sheen layers.