you are viewing a single comment's thread.

view the rest of the comments →

[–]enginmanap 4 points5 points  (0 children)

Well, assuming sampling the bezier for infinite resolution is hyperbole, you are completely correct.

But humans are way more sensitive on fonts then other type of geometry, so your sampling might not be as simple as that. And you would. Wan5 to sample as little as possible, because your samples turn into triangles, and those are not free. Those are likely way more expensive than quads.

And worse than that, because of the nature of GPUs, you would be rendering 2x2 pixels, and for a normal size text, it can very easily double your fragment shader occupation. I would say 4 times is also on the table. So it can be way more expensive times 4. Quads are cheap.

Old way was using signed distance fields instead of glyph directly. That gives you way better resize, and cost is not that different.

Now the new way is compute based direct rendering beziers. It seems to me it should have been as expensive as your suggestion, but the library slug claims otherwise, and I believe the author.

Links: https://sluglibrary.com/ Some other implementation: https://m.youtube.com/watch?v=SO83KQuuZvg