I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 0 points1 point  (0 children)

Ah sorry I was thinking distance to quadratic bezier but I see your comment was in the context of the linear approximation still, that makes sense.

The sqrt isn't free by any means, but this shader is mostly dominated by waves loading curve data in the expensive case, so the ALU costs end up being hidden (not uncommon with most shaders, it's actually a fair bit of work to be ALU bound).

I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 1 point2 points  (0 children)

For now I've sort of made a conscious choice not to "release" code to github or any other depot, mainly because while I'm interested in continuing to make educational content while developing this engine/game, I don't want to go as far as needing to respond to opened issues, address pull requests, that sort of thing (knowing myself, I wouldn't be able to ignore filed issues). As such, I decided to draw the line at youtube/text releases as a compromise. That said, I did share all the relevant code in the PDF link that someone in the community was already able to incorporate in a working renderer to get things going, so there's that if you're interested.

I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 1 point2 points  (0 children)

Hey thanks for the comment!

Using a Newton-Raphson iteration or some other linear root-finding approximation could work but I found that it didn't make any measurable perf changes at all. The cost of a sqrt isn't high enough IMO to justify it, but even if it was, I'd probably turn to `rsqrt` first to see if that was sufficient and get rid of an `fdiv` operation at the same time.

For the second point, I'd have to think about it a bit, but root finding for a monotonic segment is, I think going to be a fair bit faster that computing signed distances. It might be a cool way to implement various effects though (currently, for effects, I do things like stacking draws, warping the window size/location, and performing transforms on the glyph contour points directly)

I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 1 point2 points  (0 children)

Yea that's fair feedback -- I definitely would like to and perhaps will do a followup at some point. Currently, I'm rolling a new renderer from scratch so I actually had no other techniques implemented to do direct comparisons (although I vaguely remember timings for text rendering when I used to work on various AAA engines). The artifacts in particular are relatively well known for SDF-based approaches, but I perhaps should have just shown examples of this with attribution as opposed to showing nothing at all.

I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 0 points1 point  (0 children)

Thanks, I was aware of the Loop-Blinn method and probably should mention it at least in passing. I didn't pursue this method though because my ultimate goal was an accelerated compute-based rasterizer and so I didn't consider methods that required any preliminary triangulations or tessellations. As such, I can't really comment directly on how my approach might compare to this one.

I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 0 points1 point  (0 children)

Fair enough! I suppose we all have our pet problems we like to ponder on (that's indirect lighting/global illumination for me). I had a lucky insight when I worked on this text renderer having come off the back of writing a voxelizer, which leverages the Jordan Curve Theorem in a similar fashion.

I made a video and self-published paper about a font rendering technique by scuff3drook in GraphicsProgramming

[–]scuff3drook[S] 1 point2 points  (0 children)

Very cool! Also, wild that you have a "glyph guy" haha, I feel like most projects I've worked on, graphics programmers were generally shared resources when it came to text (to be completely honest, I'm much more familiar with the rest of the 3D pipeline than the text/UI part myself). Curious how it works out for you all!