static builder for Draw.Text(performance issue) or others polygon
hi,
I bought the Shapes, and I figure out Draw.Text has a performance issue (draw many times with same font setting)
I write the TextMeshProBuilder.
Builder.Begin();
Builder.Append(text)
Builder.End();
Builder.DrawBatch(); // put this at late update or add to urp render pipeline
maybe u can add it to ur urp pipeline of shapes.
and I hope that u can add static builder for your shapes.
let user update the static builder when he needs.
Reporting a bug? please specify Unity version:
2020.3.3f1
Reporting a bug? please specify Shapes version:
3.2.3
Reporting a bug? please specify Render Pipeline:
URP
I've now optimized text rendering a lot for Shapes 4.2.0!
It's not done exactly the same as you describe in your initial post, but
Four things have changed:
1. per-frame allocations is now 0, and CPU processing is now ~10 times faster
2. you can speed it up even more with new persistent text helpers, making CPU end ~140 times faster
3. you can now draw text regions/rects
4. all TMP text alignment options are now available