|
|
|
|
|
by borisdalstein
1747 days ago
|
|
Thanks a lot Const-me for all your very accurate responses! I basically have nothing more to add. Oh, and indeed, SDF is just completely irrelevant to the problem at hand here. I would kindly suggest ninetenfour to avoid making bold statements without more domain experience. JS is great for many things. It's just not the tool for the job here. |
|
Give you can create them from any cubic curve and it gives you offsets from it.
https://www.iquilezles.org/www/articles/distfunctions2d/dist...
If you offset in both direction from a curve, you can pick a start and end threshold to fill an outline. This only gives you rounded outline strokes. If you had separable tangential versus normal SDFs you could vary your end cap types.
Now how do you handle an arbitrary set of knots/control points in one shader? That is a separate problems for which there are a bunch of solutions.