You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently q5-webgpu has basic strokes with corner joins on rects and rounded joins on custom shapes.
I'm not interested in working on a more advanced stroke method, but if someone from the q5 community wants to, here's some more info.
The 2D canvas API provides a lot of high level functionality, including drawing strokes, but implementing strokes in WebGPU won't be so easy. Strokes can't simply by drawn as lines, they need to be drawn as shapes to account for varying stroke widths, join modes, and curves.
Currently q5-webgpu has basic strokes with corner joins on rects and rounded joins on custom shapes.
I'm not interested in working on a more advanced stroke method, but if someone from the q5 community wants to, here's some more info.
The 2D canvas API provides a lot of high level functionality, including drawing strokes, but implementing strokes in WebGPU won't be so easy. Strokes can't simply by drawn as lines, they need to be drawn as shapes to account for varying stroke widths, join modes, and curves.
@Tezumie found this interesting paper "GPU-friendly stroke expansion" by Raph Levien and Arman Uguray.
https://arxiv.org/pdf/2405.00127
These ideas are implemented in a library called Spiro.
https://levien.com/spiro/
It would be nice to have a high quality, high performance stroke implementation in q5-webgpu.
The text was updated successfully, but these errors were encountered: