microsoft / microsoft/MixedReality-GraphicsTools-Unity
Investigate MeshRenderer RectTransform layout that supports traditional batching
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 209
- Forks
- 49
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Describe the problem
Investigate if it is possible to write a meshrender/shader pair that would play nice with UnityUI rect transforms. This would allow for rect transform layouts and mesh renderer batching.
Describe the solution you'd like
From @Zee2 -
Is there any way to create a meshrenderer shader that will make a quad/etc obey RectTransforms in the way that a Graphic would?
If we could use RT layout, but traditional meshrenderer-like batching, that would be the ideal.
I feel like for 90% of usecases, we don't care at all about the actual Canvas-y features, we really just care about RT layout
Describe alternatives you've considered
Explore other ways to batch 3D UI efficiently.
Additional context
As Unity UI operates entirely in the transparent queue, any quads that have unbatchable quads overlaid atop them must be drawn before the unbatchable quads, and therefore cannot be batched with other quads placed atop the unbatchable quads.
Consider a case of three quads, A, B, and C. Assume all three quads overlap one another, and also assume quads A and C use the same material while quad B uses a separate material. Quad B therefore cannot be batched with A or C.
If the order in the hierarchy (from top to bottom) is A, B, C then A and C cannot be batched, because B must be drawn atop A and beneath C. However, if B is placed before or after the batchable quads, then the batchable quads can actually be batched – B needs only to be drawn before or after the batched quads and does not interpose them.
Source: https://learn.unity.com/tutorial/optimizing-unity-ui
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der verlinkten Anleitung zum Unity-UI-Batching und untersuche, ob ein MeshRenderer/shader-Paar RectTransform-Layouts berücksichtigen und dabei herkömmliches Batching beibehalten kann. Als abgeschlossen gilt die Aufgabe, wenn die Machbarkeit und, falls möglich, der Ansatz dokumentiert sind; andernfalls sollen praktikable Alternativen für effizientes Batching von 3D-UI dokumentiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- unity
- Bereich
- computer-graphics, game-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100