Comment by well_ackshually
2 hours ago
Rendering the final triangles isn't the issue. The issue is that while your 3D world is nicely setup polygons that benefit from all the culling you can do with it, your 2D UI is requiring vector graphics which your GPU will absolutely hate having to render. The actual composition of the UI elements is incredibly non-performant. Pushing the pixels doesn't matter.
There's a reason why browsers are so complicated and equally non performant. 2D rendering, even GPU accelerated, with the constraints we have right now (or rather, the lack of constraints, because 3D rendering is basically tradeoffs all the time), is not going to be more performant.
You don't need most of this. Give me 30 minutes, it will be easier to just build it than describe it.
I'm pretty sure that there are parallel algorithms for triangulating vector graphics that can be run on a gpu. But in general handling vector graphics is simply overkill. What are we actually using them for on the web? Rounded corners? We don't those! Let's use a paradigm that's more GPU friendly. Text can all be cached.
>I'm pretty sure that there are parallel algorithms for triangulating vector graphics that can be run on a gpu
They are. They're not particularly more performant that what we do today. It all involves tesselation on the CPU, or dropping entire feature sets.
>But in general handling vector graphics is simply overkill.
You don't get to decide that.
>Rounded corners? We don't those! Let's use a paradigm that's more GPU friendly.
That ship has sailed. The text input I'm typing this comment in has slightly rounded corners. The text it's containing is vector graphics with rounded corners everywhere, where the best renderer solution at the moment is Slug, with SDFs being a distant second.
>Text can all be cached.
sure, if you drop ligatures, only care about latin alphabet languages, accept having to rerender everything the moment I zoom the page to 110% or 125%