Map 3D: group model meshes by material so they draw as one call #477
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!477
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-477"
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-27 16:40 UTC · original
holdmysocks:six-map3d-matorder→master· +166 −46 · 3 files · 1 commits · merged 2026-11-27 17:10 UTCCity views spend most of their CPU frame time recording draw calls. Model meshes were drawn in file order, so #470's joining of neighbouring meshes rarely found two of one material side by side: the busiest models drew 30 to 70 calls for 50 to 90 meshes. Decal and see-through meshes drew one call each and rebound everything per mesh (#471 tried joining them in file order and gained little).
What changes:
orderlist gives the buffer order, and the draw loops walk it.Results (RTX 3090, master vs this PR, four city views, path off, 16 runs, no panics or validation errors; the order and cells unit tests pass):
Draws fall by 70 to 134 in the main pass and 26 to 132 in shadows. Encoder finish time drops 140 to 240 µs in every view; pass and submit time move both ways within noise, and GPU time and VRAM are unchanged. The busiest models still draw about one call per mesh: their meshes mostly have a material each, so grouping cannot join them. Images: no pixel differs by more than 16 levels in any view; at most 0.19 % differ at all, single edge pixels in far patches where coplanar opaque decals now resolve ties in model order.
@maple-quartz18 on GitHub · 2026-11-27 16:50 UTC · original
mesh shaders
github-bot referenced this pull request2026-11-27 18:13:15 +00:00