News for hackers. Stuff that matters.
Re:A Taste of GPU Compute [video] by sprash on Friday April 17, 2020 @11:42AM (#22899992)
I'm experimenting with GPU based 2D rendering using signed distance functions as drawing primitives for quiet a long time now. My experience is that as soon as the object tree exceeds a certain size the CPU will always beat the GPU. The only way the GPU can win is when you have high complexity drawing primitives and a low amount of objects which is exactly the opposite one usually encounters in the real world. Maybe the partitioning approach you are proposing will help but only real world implementations and benchmarks will tell.
Re:A Taste of GPU Compute [video] by pcwalton on Friday April 17, 2020 @07:03PM (#22903815)
I'm using partitioning in Pathfinder and it works quite well. It's not hard to beat the CPU. The forerunner of these approaches is the "Massively Parallel Vector Graphics" paper, if you're interested.

It's interesting to note the parallels (no pun intended) with raytracing, in which everyone said it was impossible to improve over the CPU right up until people discovered how to effectively partition with acceleration structures and now raytracers are doing more and more on GPU.

Re:A Taste of GPU Compute [video] by ben-schaaf on Friday April 17, 2020 @02:33PM (#22901591)
I recently-ish wrote a GPU based renderer for a GUI toolkit. I haven't put a ton of effort into optimisation, so I wouldn't be surprised if for smaller windows with lots of elements the GPU renderer was slower, but once you get to high-dpi displays with larger windows the CPU approach hits its limits. I don't have hard numbers, but we went from an unusable ~15fps at 8k resolution to hitting our target of 60fps with the GPU renderer.
Re:A Taste of GPU Compute [video] by sprash on Friday April 17, 2020 @03:19PM (#22902064)
If you use froward rendering, which means placing a bunch of textures on the screen, you are not really "drawing". We are probably not talking about the same thing.
Re:A Taste of GPU Compute [video] by ben-schaaf on Friday April 17, 2020 @11:22PM (#22905081)
It's not as complex has say drawing SVGs, but I've implemented Bezier curves, stippled lines, arbitrary rounded rectangles (html style) and subpixel-antialiased font blitting. I'd say that's far from just "placing" a bunch of textures.
Re:A Taste of GPU Compute [video] by Impossible on Friday April 17, 2020 @04:21PM (#22902594)
Building a 2D signed distance field renderer that works similar to Dreams, setting pixels instead of emitting a pointcloud, would allow for complex object trees with lots of edits and perform well on the GPU.