Hacker News new | ask | show | jobs
by Jasper_ 2635 days ago
GPUs really just aren't designed for 2D vector graphics. There is a litany of approaches (three separate ones from pcwalton's Pathfinder R&D alone), and all of them have various issues and tradeoffs. If your GPU has enough power for one of the more advanced approaches like Slug or Pathfinder1's compute shaders, then your CPU likely has enough for Blend2D and the bandwidth for the resulting texture upload.

Pathfinder3 looks promising, but comes with its own tradeoffs. It's an open area of research.

1 comments

When listing approaches, people should look at Skia Compute[0]. While it is true that traditional GPU's are not a super-great match for 2D graphics, modern GPU's are becoming more and more CPU-like, just with more parallelism. I haven't done careful quantitative evaluation of compute myself, but don't feel that any understanding of modern 2D graphics performance would be complete without that.

[0]: https://github.com/google/skia/tree/master/src/compute/skc

Wow, I haven't seen this before, thank you for the pointer! This reminds me of some of the work in this 2014 paper which used a compute-based algorithm on the GPU to implement vector textures. And of course the works of GLyphy and PF1. http://w3.impa.br/~diego/projects/GanEtAl14/