So I took @warrenm's MetalSlug (https://github.com/metal-by-example/MetalSlug) - itself an implementation of the https://sluglibrary.com paper…

Ported it to https://metalsprockets.com

Optimised it so it renders all text in a single draw call (from an original 40,000 draw calls…)

And then entered the matrix?

Every glyph is vector. Whoa.

(Code needs a cleanup - it got messy but will put it online soon)

Ok I guess I wasn't left any choice in the matter.

For those wondering…

What's cool about this is that it uses true vector glyphs. A lot of text in 3D (and in your GPU accelerated Terminals etc) render the glyphs to textures at fixed (usually high) resolution. Or uses Signed Distance Fields trickery to render them well.

This code is using the slug algorithm that @warrenm ported recently after the paper went public domain.

Much more info here:

https://metalbyexample.com/slug/

Slug

I expected to have to wait 12 more years to write this post. Back in 2017, Eric Lengyel published the landmark paper, “GPU-Centered Font Rendering Directly from Glyph Outlines” in the J…

Metal by Example

I also think it's cool because it uses my http://metalsprockets.com project which makes working with Metal on mac, iOS and visionOS super(*) easy. But I'm biased.

(* for some value of super)

GitHub - schwa/MetalSprockets: MetalSprockets

MetalSprockets. Contribute to schwa/MetalSprockets development by creating an account on GitHub.

GitHub
@schwa Ohhh. This looks excellent! I got tired of all the boilerplate I need for even the simplest Metal project.