Live data from Hacker News

Show HN: Forma – An efficient vector-graphics renderer

github.com

51–60 of 64 posts

Re: Show HN: Forma – An efficient vector-graphics renderer

#51

> 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.

Ok, and when you sort these pixel-contained segments, what's the ordering?

Re: Show HN: Forma – An efficient vector-graphics renderer

#52
post #33

I 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…

Ahh I also went down the SVG-for-browser game. The promise of vector (resize-and-without-loss) seemed good right.

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

#54

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 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/

[deleted]

Re: Show HN: Forma – An efficient vector-graphics renderer

#55

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 vect…

[deleted]

Re: Show HN: Forma – An efficient vector-graphics renderer

#56
post #22
post #3

Mozilla 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

I don't understand why this isn't mentioned in the README. I wonder how they compare!

Re: Show HN: Forma – An efficient vector-graphics renderer

#57
post #3

Mozilla 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.

Just five days ago OsmAnd 4.3 for Android with new faster rendering engine that uses OpenGL was released.

https://osmand.net/blog/osmand-android-4-3-released/#new-fas...

Re: Show HN: Forma – An efficient vector-graphics renderer

#58
post #22
post #3

Mozilla 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

In GIS, vector things are better, but the community used to use rasters

Re: Show HN: Forma – An efficient vector-graphics renderer

#59
post #38

Earlier 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.

I 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).

Re: Show HN: Forma – An efficient vector-graphics renderer

#60
post #13

The 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.

Feature request: a demo URL that does that!

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.

Post reply on HN