> Line segments are transformed into pixel segments by intersecting them with the pixel grid. We developed a simple method that performs this computation in O(1) and which is run in parallel. What's a pixel segment exactly? Just a list of pixel coordinates that intersect?
A pixel segment is a line segment that fits inside of a pixel's square box. It can start and end anywhere inside of this 1x1 square box and it has a 64bit compact representation.
Show HN: Forma – An efficient vector-graphics renderer
51–60 of 64 posts
Re: Show HN: Forma – An efficient vector-graphics renderer
#52I hope this makes its way into web browser rendering. I've been working on a "game engine" using SVG in the browser. When I started, everything I read said don't - because performance. However, manipulating an SVG using a reactive framework (I use Vue) makes for very readable code. Our game client is meant to be a "reference" client so readability is more important than performance, which just needs to be "good enoug…
I ran into a bunch of issues especially with text, when starting to scale "objects-with-txt", had to add bunch of weird css-stuff everywhere and not it's not very cross-browser.
I'm now back on the ThreeJS train again :/
Re: Show HN: Forma – An efficient vector-graphics renderer
#53Re: Show HN: Forma – An efficient vector-graphics renderer
#54I'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 vect…
> 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/
Re: Show HN: Forma – An efficient vector-graphics renderer
#55I'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 vect…
Re: Show HN: Forma – An efficient vector-graphics renderer
#56Mozilla peeps, is it conceivable that this could eventually get into firefox, or is it not the right fit in some way. There was a recent discussion about map rendering and I commented to "just convert to SVG and let the browser render it" to which someone said that's too slow, to which I said "so improve the browsers vector rendering" rather than do a high performance renderer just for map software.
You might be interested in https://github.com/servo/pathfinder
Re: Show HN: Forma – An efficient vector-graphics renderer
#57Mozilla peeps, is it conceivable that this could eventually get into firefox, or is it not the right fit in some way. There was a recent discussion about map rendering and I commented to "just convert to SVG and let the browser render it" to which someone said that's too slow, to which I said "so improve the browsers vector rendering" rather than do a high performance renderer just for map software.
Was this conversation about OsmAnd+ by chance? Because that could use something like this. Edit: glossed over the "browser" part. My bad.
https://osmand.net/blog/osmand-android-4-3-released/#new-fas...
Re: Show HN: Forma – An efficient vector-graphics renderer
#58Mozilla peeps, is it conceivable that this could eventually get into firefox, or is it not the right fit in some way. There was a recent discussion about map rendering and I commented to "just convert to SVG and let the browser render it" to which someone said that's too slow, to which I said "so improve the browsers vector rendering" rather than do a high performance renderer just for map software.
You might be interested in https://github.com/servo/pathfinder
Re: Show HN: Forma – An efficient vector-graphics renderer
#59Earlier quoted context omitted.
How does this compare to https://github.com/RazrFalcon/resvg ?
That'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.
Re: Show HN: Forma – An efficient vector-graphics renderer
#60The README mentions WebGPU - do you have a URL to a demo of this running in the browser using WebAssembly?
It's quite easy to get the CPU back-end running with WASM. GPU might work as well with Chrome Canary, but I haven't tested it yet. Using WebGPU should make this just as easy.
I'm interested enough to click on a demo, but I'm not _quite_ interested enough to figure out what hoops I would need to jump through to get that demo running myself.