8 ms·
I'm very happy to see this work! The era of rendering vector graphics in GPU compute shaders is upon us, and I have no doubt it we'll start seeing these in prod
by raphlinus 4y ago
I'm very happy to see this work! The era of rendering vector graphics in GPU compute shaders is upon us, and I have no doubt it we'll start seeing these in production soon, as there's just such a performance advantage over CPU rendering, and I believe trying to run vector 2D graphics through the GPU rasterization pipeline doesn't quite work.
This code is simpler than Vello (the new name for piet-gpu), focused on vector path rendering. It's also a strong demo of the power of WebGPU, while also having a performant software-only pipeline. I definitely encourage people to take a closer look.
- dragostis 4y agoThank you for the endorsement. Looking forward to collaborating more with you on 2D graphics.
- nerpderp82 4y agoHow does this compare to https://github.com/RazrFalcon/resvg https://github.com/RazrFalcon/resvg ?
- mkl 4y agoThat's a different kind of thing, I think. It renders using tiny-skia, so probably comparing to tiny-skia would be more appropriate? It also sounds like resvg's renderer can be swapped out, so it may be possible to have it render with Forma.
- nerpderp82 4y agoThat sounds neat.
- CryZe 4y agoI just tried it in my own renderer (that uses tiny-skia) to compare performance, but unfortunately forma is still lacking some features to do a proper comparison (strokes, the ability to scale shapes up instead of only down (?????), rendering without clearing).
- tsuru 4y agoI saw google, I saw Rust, and I was betting it was you. I lost my bet but still happy to see it!
- deleted 4y ago[deleted]
- gct 4y agoHaven't Skia et al been GPU accelerated for ages?
- deleted 4y ago[deleted]
- jahewson 4y agoYes, Skia uses the traditional method of tessellating path geometry on the CPU and then having the GPU handle transforming and shading it as if it were 3D geometry. Compare that with what we see here, which uses compute shaders for the whole process.
- pcwalton 4y ago> I believe trying to run vector 2D graphics through the GPU rasterization pipeline doesn't quite work. I mean, it does work, it's just slower than using compute in most cases. I mean, people have emulated Linux in the GPU rasterization pipeline [1], so the raster pipeline is clearly Turing complete :) [1]: https://blog.pimaker.at/texts/rvc1/ https://blog.pimaker.at/texts/rvc1/
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]