4 ms·
It’s possible to perform the rendering of the font itself on the GPU (e.g. Pathfinder) instead of rendering an atlas on the CPU and sending it over to the GPU,
by Pulcinella 5y ago
It’s possible to perform the rendering of the font itself on the GPU (e.g. Pathfinder) instead of rendering an atlas on the CPU and sending it over to the GPU, but I’m not sure of any text editors that do so.
- dahart 5y agoOf course, it’s definitely possible. Just doesn’t seem like there are good reasons to spend time directly rendering the same font characters repeatedly, right? That’d be spending a lot of compute doing something you can pre-render and cache in a texture. ;) This is why a lot of CPU implementations render text atlases too.
- Pulcinella 5y agoI suppose you could also pre-render to an atlas on the GPU. I would also say, personally, there is something aesthetically pleasing about rendering vector graphics (fonts, SVG, etc.) on the GPU. “It’s a graphics processing unit, shouldn’t it be handling vector graphics as well?!” :)
- dahart 5y agoTotally, you could. But in the case of a text editor, that would probably be purely to flex and not because it’s faster or better or easier, right? People are definitely doing tons of vector rendering on the GPU. And the GPU is fantastic for vector graphics generally, mainly still because of the conversion to pixels. I posted links to Hughes Hoppe’s paper and the NV path rendering library, for example. Those can do font rendering as well, but I still wouldn’t use those for rendering fonts directly or for rendering text atlases because it would be difficult to implement.