Four-layer ground: layer UVs from the material's constants (128 per unit, not 64) #171
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!171
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/171/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 15:44 UTC · original
holdmysocks:claude/ground-detail-scale→master· +38 −3 · 2 files · 1 commits · merged 2026-11-24 16:05 UTCWhat
A four-layer ground material's description (
multilayerinmodel.jsonandmaterials.json) said every layer tiles asTEXCOORD_0 * 64. That was an assumption. Each layer's UV is now taken from the material's own constants, which became readable with #163.724bed95(one value per layer): 1 = the layer uses the first UV set, anything else the second.4344d2cc: scale (xy) and offset (zw) of the first set.9ecaaa1e: the same for the second.multilayer.layers[k]now carriesuv_set,uv_scale,uv_offsetanduv_source;detail_uv.recommendedfollows layer 0 and says the values are per layer.Evidence
standard_uber_4lyrone and the main one ofstandard_uber_4lyr_dpm_dm_hbb, the most used variant) both computeuv0 * 4344d2cc.xy + zwanduv1 * 9ecaaa1e.xy + zwand pick one per layer by comparing the layer's724bed95component with 1.TEXCOORD_0, 128, offset 0 or 128 on all four layers of its materials.Changed
material.rs:four_layer_uvfills the layers from the constants; the fallback without constants is 128 and says it is assumed; the text about per-layer tiling is updated.cargo test -p sixng-core: 174 passed (the four-layer test covers a material whose layer 1 uses the second set).Not done, not checked
26cc8f94); not decoded.alt_uv_set).0ad54cb9) shows the same constants in the survey but is not in this description's list; not touched.