Instanced drawing for repeated models
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- computer-graphics, game-dev, performance
Direzione di ricerca
Start with Example 12 and the render path around RenderList.Collect and BuildDraws, then reproduce the 10k and 50k measurements described here and in #64. Prototype persistent per-(mesh, material) instance buffers for Example 12's boxes, wire membership to structural change notifications, and keep material-override or per-object-shader cases as individual draws. Done means draw preparation drops by an order of magnitude at 10k boxes with identical output and the GPU tests still green; #104, #325, #326 and the flat-soa-snapshot-pattern design are the background to read first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Current State
GPU instancing (#104) batches identical mesh and material draws at submission. On the CPU, the shipped Example 12 still prepares 9,996 of its 10,001 boxes as individual draw items. Every frame, the renderer walks all 10k models (RenderList.Collect, ~0.9 ms) and prepares one draw each (BuildDraws, ~1.55 ms), then rebuilds the instance data. After the physics fixes, this is the render-side scaling wall: its cost grows linearly with the object count, even when nothing but poses changed.
Proposal
- Keep persistent per-batch instance buffers for repeated (mesh, material) models. Membership is maintained by structural change notifications, the way the scene index tracks cameras.
- Per frame, write only the transforms (ideally a bulk copy from the transform snapshot in the Tier 2 SoA issue) and cull per batch.
- Feed debris-tier bodies (Tier 3) into the same buffers straight from the physics pose arrays.
Tasks
- Measure the current per-draw CPU cost at 10k and 50k (Collect, BuildDraws, instance upload) in the exported game.
- Prototype persistent batches for Example 12's boxes and compare against today's path, including culling and material overrides.
- Define when a model leaves a batch (unique material override, per-object shader data) and keep those as individual draws.
Acceptance Criteria
- At 10k repeated boxes, CPU draw preparation falls by an order of magnitude, with identical images (the GPU tests stay green).
- Steady-state preparation allocates nothing, and per-object CPU cost scales linearly or better.
Related
- #104 (GPU instancing at submission)
- #64 (the measurements)
- #325 (transform SoA, Tier 2) and #326 (two-tier entities, Tier 3)
- Shared mass4-wiki design:
flat-soa-snapshot-pattern(flat snapshots, stable indices, identity maps, structural change notifications, double buffering and compaction), aligned with MASS4ORG/Guinevere#120.
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 1
- Merge medio
- 1h 46m
- PR unite (30g)
- 41
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MASS4ORG/Turian
-
c:assets p:low size:XS t:task
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
I maintainer di solito rispondono entro 1 giorno
-
c:engine p:medium sit:waiting size:L t:refactor
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
c:gaya p:medium sit:next t:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
c:engine p:low size:XL t:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MASS4ORG/Turian
Issue simili
-
area-ai bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
dotnet/extensions#7893 ·
I maintainer di solito rispondono entro 1 giorno
-
devtools documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
area-System.ComponentModel untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
dotnet/runtime#136608 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
fix: Cannot reopen dialog after closing with escape key in FluentDialogForse già presa @bryan-ramirez l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/fluentui-blazor#5572 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sillsdev/languageforge-lexbox#2846 ·
I maintainer di solito rispondono entro 1 giorno