3 ms·
SDF is cool but not a generally good solution to GPU vector graphics. It only works for moderate scaling up before looking bad, the CPU prep figuring out the da
by Guzba 4y ago
SDF is cool but not a generally good solution to GPU vector graphics. It only works for moderate scaling up before looking bad, the CPU prep figuring out the data the GPU needs takes far longer than just rasterizing on CPU would, etc. It's great as a model for games where there are many renders as world position changes but that's about it.
- johndough 4y ago> It only works for moderate scaling up before looking bad That problem has been solved by multi-channel signed distance fields https://github.com/Chlumsky/msdfgen https://github.com/Chlumsky/msdfgen
- cyber_kinetist 4y agoThe decomposition method used by msdfgen works well enough for fonts, but I'm not sure if it would work for more complex vector drawings. Probably would need much more than 3 color channels (= decompositions) to render something like the tiger SVG...
- tayistay 4y agoSeems like you're thinking of precomputed SDFs that are stored in a texture. They don't have to be :) (for example, my little library: https://github.com/audulus/vger https://github.com/audulus/vger)
- cyber_kinetist 4y agoIf you are talking about analytic SDFs, then you need a good "decomposition" method that can divide an arbitrary SVG into simple SDF-friendly primitives. Mabye it could be done, I think it can be a good research topic.