General performance tips for many Shapes
Hello,
I am trying to draw lines created and imported from a CAD software.
There are multiple 1000 of Lines, Arcs, Polylines, Splines and Text elements.
Currently I'm creating one GameObject for each (except Text) element. No immediate drawing. Build-in RenderPipeline.
Many lines have different positions but not so many different characteristics (color, thickness, style etc). Perhaps 20 different styles in total
On an example scene I'm using for tests has > 65000 lines, > 20000 arcs, > 500 splines.
Batches: 5400, Saved by batching ~75000
Anything I can try to improve this? Running quite low on high end PC
that's a pretty significant amount of stuff to have as separate objects. once you hit these amounts, a lot of it is about merging multiple things into one mesh, which Shapes doesn't currently have support for
I'd double check the frame debugger - it usually says why batches are broken and why draw calls can't be merged, it might contain more info. (although it's possible it's just because of the sheer quantity)
Shapes also relies on GPU instancing, so make sure that's working correctly in your setup
There is a long term update I've been working on that would at least allow you to combine multiple lines/polylines into a single render, which would help a lot in this case, but it's not quire ready yet!