Custom "point"
mark shapes
#236
Labels
core
Related to the Core package
enhancement
New feature or request
good first issue
Good for newcomers
WebGL
Somehow related to WebGL or GPU
This is a very low-priority issue.
Custom SVG shapes would be nice to have. Vega-Lite supports them in the
shape
property/channel through SVG path strings: https://vega.github.io/vega-lite/docs/point.html#propertiesThe custom paths could be rendered into an SDF texture, as shown in Ricky Reusser's sdf-points-with-regl notebook.
However, Ricky's notebook uses bitmap-sdf, which produces very low-quality SDFs, requiring very large texture sizes. Bitmap-sdf could be replaced with webgl-sdf-generator, which uses a different algorithm with a superior quality. Still, neither of them generates multichannel SDFs.
A significant limitation of SDF-based shapes is the rendering of strokes, which always have rounded joins, making shapes with sharp corners look quite silly:
To get sharp edges, pseudo distances (2.5 Pseudo-distance fields in Viktor Chlumský's thesis) could be used instead true distances. No JavaScript or WASM implementation exists, however.
The text was updated successfully, but these errors were encountered: