-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenA-TextRendering and layout for charactersRendering and layout for charactersC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times
Description
What problem does this solve or what need does it fill?
Unlike 2d sprites, it seems that Text2d is neither batched nor culled. A simple benchmark spawning 5000 off-camera Text2dBundle instances yields the following FPS for me:
- No characters (empty string): 2400 FPS
- 1 character: 1200 FPS
- 3 characters: 750 FPS
- 50 characters: 45 FPS
Batching may be a little tougher due to varying size glyphs, but from what I understand culling should be fairly straightforward.
What alternative(s) have you considered?
In my case, almost all Text2d is parented to a border sprite, so I just manually set its visibility to match its parent sprite so when it gets automatically culled the text also becomes hidden.
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenA-TextRendering and layout for charactersRendering and layout for charactersC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times