[1] My goal is to implement realistic train track geometries, including transition curves, using Euler spirals or perhaps a simpler curve.
[2] For example, I'd like to try tessellating curves via shaders as required, based on zoom level etc.
That said, I'd really love to see more stuff along the lines of what you describe. I think Vello could render, for example, something that visually looks like Mini Metro or Mini Motorways. I also of course would be a massive fan of using Euler spirals - the only curve that's truly, really simpler is quadratic Béziers, and making those look good in your application would be hard. I'm about to do a lot of Euler spiral math on GPU as part of the stroke rework, which you may find interesting.
Strokes are easier for GPUs than fills, because you don't have to worry about the winding number issues (non-convex paths, paths with holes, etc). There are two recent papers, Polar Stroking[2] and Converting stroked primitives to filled primitives[3].
Also check out Freya Holmér's excellent Shapes library[4] (easily integrated with Unity).
Tesselating curves via shaders is the future (through mesh shaders in particular), and I've got a colleague working on that, but portable infrastructure seems to me just as thorny a problem as compute. I am very biased, but if it were me I'd try to render the 2D stuff with a 2D renderer like Vello.
Best of luck with your project, and I'd be interested in following the progress. Feel free to stop by the Zulip[5] and ask such questions there, as well.
[1]: https://blog.mecheye.net/2019/05/why-is-2d-graphics-is-harde...
[2]: https://arxiv.org/abs/2007.00308
[3]: http://w3.impa.br/~diego/projects/Neh20/
[4]: https://assetstore.unity.com/packages/tools/particles-effect...
This is really the issue with 3D Web APIs.
WebGL 2.0 give us something like a Playstation 3 (released in 2005).
WebGPU 1.0 will give us the state of the art in 3D API as they were in 2014.
Meanwhile streaming and native will give us the APIs as they are available today.
It is way faster than Pathfinder, and Macroquad is faster than Pathfinder. Pathfinder was overall a good experience except it wasn't that easy to get started but once things were set up, it was pleasant especially the API with text alignment etc.
For some reason Macroquad seemed to have the best frame rate with all those rectangles (OHLC candles if anyone is wondering -- 3-4k of them being dragged around). Vello looked like it most definitely would beat Macroquad but instead of dropping the framerate it looks like it drops the rectangles.
We will also soon be special-casing rectangles. Might be worth rerunning your experiment in a few weeks when all this has landed.
In any case, glad for your interest!
To use an analogy. Think of Vulkan, Metal, DirectX 12 (DX12) as different database engines. They run compute/render shaders which are incompatible dialects of each other (like Oracle SQL != Postgres SQL != MySQL). WGPU tries to be the ANSI SQL.
This an oversimplification ofc. Today most shaders compile to an intermediate form Spir-V which then targets different backends and can lead to some funny translation.
> GLSL/HLSL/MSL -> SPIRV -> WGSL -> SPIRV -> GLSL/HLSL/MSL
See https://github.com/gpuweb/gpuweb/issues/566