‹ BackHN Continuity

Thread

SDF vs. MSDF vs. Slug: GPU Text Rendering

180 points · 72 comments · ibobev

  1. cubicool · · focus · HN ↗
    I'm the author of slughorn/osgSlug, and was surprised to find this thread. The article my boss put out a few days ago focused mostly on the "text-centric" aspects of Slug (which is what it was originally created for, afterall), but slughorn has grown into WAY more than that now. :) Glyphs are, afterall, "just shapes", and the whole experiment started with my asking: "why can't it just do ALL VECTOR GRAPHICS!?" And so ... yeah. Here we are.

    We're still nowhere near the levels of libraries like Noesis or Rive (which are fundamentally different approaches to the same idea), but hey--maybe one day. There's already an impressively large stack of stuff I've been able to pull of with just some clever shader tricks, and I'm coming up with more things I want to try every day.

    Right now I'm working on adding completely GPU-driven "path stroking" to slughorn/osgSlug (which uses SSBO to store/update a `slughorn::Path` and then does some `gl_InstanceID` tricks to dynamically "emit" the necessary geometric bounds Slug needs to do its analytical fill/antialiasing), and after that I'll go back to finishing the full Porter-Duff compositing stack.

    There are also a handful of UIs from games I want to try "cloning" (Deadspace's diegetic style, the radio scanner from the Arkham games, etc). I also keep this HUGE directory of UIs I see in shows/movies; every time I see some mocked-up thing and think to myself, "I wonder how they did that?", I usually snap a screenshot to poke at later.

    Here are some "just for fun" screenshots of interesting stuff I haven't put up on Github yet:

    <a href="https:&#x2F;&#x2F;slughorn.io&#x2F;funsies-00.png" rel="nofollow">https:&#x2F;&#x2F;slughorn.io&#x2F;funsies-00.png &lt;- which one is 2D!? ): <a href="https:&#x2F;&#x2F;slughorn.io&#x2F;funsies-01.png" rel="nofollow">https:&#x2F;&#x2F;slughorn.io&#x2F;funsies-01.png &lt;- decaling slughorn-based &quot;shapes&quot; on 3D meshes; you can zoom until the GPU runs out of float precision

    There&#x27;s a whole slew of cool changes I haven&#x27;t fully updated the repo with; there just aren&#x27;t enough hours in the day, and we still gotta pay bills. Anyway, I&#x27;ll check back later if anyone has any questions&#x2F;ideas&#x2F;things they&#x27;d like to see... that kinda feedback dictates what I focus on next. :)

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.