← Back to context

Comment by nananana9

2 hours ago

What?

You can try rendering a 2D rectangle as 2 quads in whatever GPU API you like the most, then try pushing the same amount of pixels to a CPU buffer via the widest CPU memory write instructions you can have (and then wait the GPU-accelerated compositor upload them to the GPU anyways to present them...).

I can tell you for a fact one will be 2 orders of magnitude faster, want to make bet which one?

Using a GPU api does not imply you have to render at the screen's refresh rate, or even that you have to update the entire window.

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.