3D map: the shared mesh shader without the sticker part too #527

Manually merged
github merged 1 commit from github-bot/gh-527 into gh-pr/527/base 2026-11-28 03:49:33 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-28 03:32 UTC · original
holdmysocks:claude/map-no-sticker-part → master · +16 −6 · 2 files · 1 commits · merged 2026-11-28 03:46 UTC

What

Follow-up to PR 520. The 3D map's renderer now builds the shared mesh shader without the sticker part as well, not only its material-table variant.

PR 520 left two things open: the meshes the map draws with the shared shader kept the sticker part, and with the material table off (SIXNG_MAP_GPU_DRAWS=0, or where it is not available) nothing had changed. The map has a renderer of its own (new_map), and nothing sets stickers on its models, so its copy of the shared shader can leave the part out the same way: the one line that reads the sticker count becomes the constant 0.

  • The piece and its replacement are one constant (gpu_draw::NO_STICKERS), used by the material-table transform and by the map's renderer.
  • The model viewer's renderer and the thumbnail renderer are unchanged, so stickers draw there as before.
  • The shader test now also checks that the piece is in the shared shader exactly once (the renderer's replacement has no check of its own at run time).

Checked

Same map view as in PR 520 (RTX 4080, 2560x1440, GPU time of the main pass from the map's tick lines), this change against master, runs taken in turn. Other work was running on the machine and the GPU this time (GPU about 40 % busy before the runs), so the figures are higher than in PR 520 and only the pairs compare:

material table master this change
on (1775 or 1776 draws in every run) 6.00 to 6.06 ms, 6.27 to 6.30 ms 5.35 to 5.52 ms, 5.35 to 5.38 ms
off (4136 draws in every run) 7.01 to 7.66 ms, 7.58 to 8.02 ms 5.83 to 5.91 ms, 5.52 to 5.88 ms
  • With the change the material-table path still comes up, with the same draw counts.
  • cargo test -p sixng-gui: 68 pass, 2 ignored.

Not decoded / not done

  • Not measured on a quiet machine. The direction is the same in all four pairs; the sizes are not to be relied on.
  • The map's pictures were not compared pixel by pixel (the map never has stickers, so nothing should differ).
  • Why code that never runs costs this much is still not known.
  • The model viewers keep the sticker part for every mesh, also for models without stickers. Not measured there.
**@⁠holdmysocks** on GitHub · 2026-11-28 03:32 UTC · [original](https://github.com/holdmysocks/SixNG/pull/527) `holdmysocks:claude/map-no-sticker-part` → `master` · +16 −6 · 2 files · 1 commits · merged 2026-11-28 03:46 UTC ## What Follow-up to PR 520. The 3D map's renderer now builds the shared mesh shader without the sticker part as well, not only its material-table variant. PR 520 left two things open: the meshes the map draws with the shared shader kept the sticker part, and with the material table off (`SIXNG_MAP_GPU_DRAWS=0`, or where it is not available) nothing had changed. The map has a renderer of its own (`new_map`), and nothing sets stickers on its models, so its copy of the shared shader can leave the part out the same way: the one line that reads the sticker count becomes the constant 0. - The piece and its replacement are one constant (`gpu_draw::NO_STICKERS`), used by the material-table transform and by the map's renderer. - The model viewer's renderer and the thumbnail renderer are unchanged, so stickers draw there as before. - The shader test now also checks that the piece is in the shared shader exactly once (the renderer's replacement has no check of its own at run time). ## Checked Same map view as in PR 520 (RTX 4080, 2560x1440, GPU time of the main pass from the map's tick lines), this change against master, runs taken in turn. Other work was running on the machine and the GPU this time (GPU about 40 % busy before the runs), so the figures are higher than in PR 520 and only the pairs compare: | material table | master | this change | |---|---|---| | on (1775 or 1776 draws in every run) | 6.00 to 6.06 ms, 6.27 to 6.30 ms | 5.35 to 5.52 ms, 5.35 to 5.38 ms | | off (4136 draws in every run) | 7.01 to 7.66 ms, 7.58 to 8.02 ms | 5.83 to 5.91 ms, 5.52 to 5.88 ms | - With the change the material-table path still comes up, with the same draw counts. - `cargo test -p sixng-gui`: 68 pass, 2 ignored. ## Not decoded / not done - Not measured on a quiet machine. The direction is the same in all four pairs; the sizes are not to be relied on. - The map's pictures were not compared pixel by pixel (the map never has stickers, so nothing should differ). - Why code that never runs costs this much is still not known. - The model viewers keep the sticker part for every mesh, also for models without stickers. Not measured there.
The map's renderer leaves the sticker part out of its copy of the shared shader, as its material-table variant does since PR 520: for the meshes it still draws with it, and for the path with the material table off.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 03:38:04 +00:00
github-bot changed target branch from master to gh-pr/527/base 2026-11-28 03:49:30 +00:00
github manually merged commit ee83015344 into gh-pr/527/base 2026-11-28 03:49:33 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.