Map 3D: decal and blended draws bind only what changed #471

Closed
github-bot wants to merge 1 commit from github-bot/gh-471 into master AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 07:03 UTC · original
holdmysocks:six-map3d-sorteddraws → master · +71 −19 · 2 files · 1 commits · closed without merging

Decal and see-through draws in the 3D map do less work per mesh.

  • Before: each decal and see-through (glass, water, alpha-blended) mesh rebound its model's frame group and instances, its material, and both buffers.
  • Order kept: these draws stay in their order (decals by layer, see-through back to front).
  • Fewer rebinds: they bind only what changed since the previous draw.
  • Joined ranges: a mesh of the same model and material whose indices follow straight on joins the pending draw. This relies on the shared-buffer index ranges from #470.
  • Empty draws dropped: models whose instances are all coverage fallbacks, so nothing draws normally, are left out. Before, they issued draws with zero instances.
  • README updated.

The A/B on the second PC (timings, draw counts, image diffs at the four city poses and 300a) is pending. The results will be added here.

**@⁠holdmysocks** on GitHub · 2026-11-27 07:03 UTC · [original](https://github.com/holdmysocks/SixNG/pull/471) `holdmysocks:six-map3d-sorteddraws` → `master` · +71 −19 · 2 files · 1 commits · closed without merging Decal and see-through draws in the 3D map do less work per mesh. - **Before:** each decal and see-through (glass, water, alpha-blended) mesh rebound its model's frame group and instances, its material, and both buffers. - **Order kept:** these draws stay in their order (decals by layer, see-through back to front). - **Fewer rebinds:** they bind only what changed since the previous draw. - **Joined ranges:** a mesh of the same model and material whose indices follow straight on joins the pending draw. This relies on the shared-buffer index ranges from #470. - **Empty draws dropped:** models whose instances are all coverage fallbacks, so nothing draws normally, are left out. Before, they issued draws with zero instances. - README updated. The A/B on the second PC (timings, draw counts, image diffs at the four city poses and 300a) is pending. The results will be added here.
Each decal and see-through mesh rebound its model's frame group and
instances, its material and both buffers. They now keep their order and
bind only what changed, a mesh of the same model and material whose
indices follow on joins the pending draw, and models whose instances are
all coverage fallbacks (none drawn normally) are left out.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 07:05:58 +00:00
github-bot closed this pull request 2026-11-27 07:39:29 +00:00
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-27 07:36 UTC · original

Closing: measured on the second PC (RTX 4080), this saves only 18-78 main draws per frame, because few decal and see-through meshes follow on in index order. CPU time rose at two of four city poses, from higher submit time, and fell slightly at the other two. Images matched. Not worth the change.

**@⁠holdmysocks** on GitHub · 2026-11-27 07:36 UTC · [original](https://github.com/holdmysocks/SixNG/pull/471#issuecomment-7212637919) Closing: measured on the second PC (RTX 4080), this saves only 18-78 main draws per frame, because few decal and see-through meshes follow on in index order. CPU time rose at two of four city poses, from higher submit time, and fell slightly at the other two. Images matched. Not worth the change.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.