Water: take the inland height texture's scale from the drawable's stored bounds #534
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!534
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-534"
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-28 04:32 UTC · original
holdmysocks:water-flat-scale→master· +19 −10 · 2 files · 2 commits · merged 2026-11-28 04:45 UTCThe inland water height texture decodes as
z = origin z + (2 v - 1) * H.sixng water --inlandnow takesHfrom the drawable's stored bounding box instead of measuring it from the mesh. This settles the known gap of the flat tiles whose scale wasn't known.His the top of the bounding box, which each tile now lists asmodel_bounds. On all 940 tiles with a height texture it matches the old measure, the largest distance of a surface vertex from the origin's height, to within 1 cm. On the sloped tiles they agree exactly.H, they lie within 2.4 mm of the mesh. So the varying values do not hide a lost height scale.-(H + d), wheredis the unnamed constant02596957(3 to 60 m). That is the depth of the skirt below the surface, on 886 of the 940 tiles. Its name is still unknown.H, and on 325 it is under 3%.water_height_checkgainsscale_from(bounds, orverticeswhen a drawable has no bounds) andvertex_distance_m. The notes ininland.jsonand the README say the same.Tests:
cargo check --workspace --all-targetsandcargo test -p sixng-core -p sixng-gui --releasepass. The--inlandexport was run on the real install.