Mike Turitzin
banner
miketuritzin.bsky.social
Mike Turitzin
@miketuritzin.bsky.social
Building a game/engine based on signed distance fields

~ Past: rendering lead @figma.com, indie VR dev, founder @ Workflowy, search backend @ Google, Quake modder

miketuritzin.com
Pinned
Playing around with a "tunnel gun" that can open a tunnel in front of you that can be looked into or moved through.

This type of thing is really simple in my engine - just spawn an SDF capsule subtraction that is locked to the player's view.
Just saw this in an article and had to double-take - I don't think I've ever seen switch cases used this way.

The idea is to handle both alt+return and F11 without calling SetFullscreen twice, presumably.

Seems cursed?
December 31, 2025 at 8:20 PM
You know things are getting serious when I break out this "math" stock photo in my (upcoming) video
December 23, 2025 at 7:27 PM
Finally switched my engine to use "reversed z", which I should have done to start, as it's a no-brainer for perspective projections (enormous benefit to depth precision in the distance, dramatically reducing the chances of z-fighting at no cost).

It took a few hours to ...
December 23, 2025 at 6:53 PM
It's hard to find videos of SIGGRAPH "Advances in Real Time Rendering" talks, but many of them are freely available:

Go here, and click into "Courses" for the year you want, then one of the "Advances ..." sessions.

dl.acm.org/conference/s...
SIGGRAPH Conference - Proceedings
dl.acm.org
December 22, 2025 at 7:46 PM
So tempting to use stupid effects in DaVinci Resolve, haha
December 17, 2025 at 9:34 PM
I am now an official contributor to Dawn - albeit with a 1-line fix to disable D3D's default broken alt+enter fullscreen handling.

dawn-review.googlesource.com/c/dawn/+/281...

Hope someone else benefits, the investigation for this took a while.
Gerrit Code Review
dawn-review.googlesource.com
December 17, 2025 at 7:30 PM
Finally on the home stretch of finishing my 20 minute video explaining my SDF engine - how it works, what it can do, etc.

This has taken way longer than expected (my first real YouTube video).
December 17, 2025 at 12:53 AM
Reposted by Mike Turitzin
My "No Graphics API" blog post is live! Please repost :)
www.sebastianaaltonen.com/blog/no-grap...

I spend 1.5 years doing this. Full rewrite last summer and another partial rewrite last month. As Hemingway said: "First draft of everything is always shit".
No Graphics API — Sebastian Aaltonen
Graphics APIs and shader languages have significantly increased in complexity over the past decade. It’s time to start discussing how to strip down the abstractions to simplify development, improve pe...
www.sebastianaaltonen.com
December 16, 2025 at 6:52 PM
More FunTimes™ with Windows APIs - fullscreen was broken in my engine, and it turns out that D3D *by default* listens for alt+enter to go fullscreen, but does so in a weird/broken way. (And that was also breaking my own code to go fullscreen.)

The fix: turn this off manually ..
December 12, 2025 at 7:32 PM
In case you aren't aware, Matt Godbolt has been doing a series of short videos diving into compiler assembly generation / optimization, and it's really good!

www.youtube.com/@MattGodbolt...
Matt Godbolt
Matt is a programmer and occasional verb. He loves writing efficient code and sharing his passion about how computers work under the hood. A low-latency engineer in finance, he has previously worked a...
www.youtube.com
December 10, 2025 at 8:32 PM
Finally updated from SDL2 -> SDL3 in my engine.

The transition was pretty easy, with the exception of all the "pixel scale" and "content scale" stuff that is now more complicated than there just being a single "pixel density" number for high-DPI.

wiki.libsdl.org/SDL3/README-...
SDL3/README-highdpi
The Simple Directmedia Layer Wiki
wiki.libsdl.org
December 9, 2025 at 9:08 PM
Good article on the 'why' and 'how' behind custom memory allocators:

www.rastergrid.com/blog/sw-eng/...

Screenshots show requirements of general purpose allocators and how loosening these provides benefits to custom allocators.
December 4, 2025 at 6:16 PM
I've settled on using a simple utility that wraps D3D's SetStablePowerState to stabilize GPU clock rate when profiling using in-app timers.

This simple program does the trick:
github.com/milkru/gpu_c...

This should even work when profiling, e.g., WebGPU apps in browser!

[cont]
GitHub - milkru/gpu_clock_stabilizer: Simple GPU clock stabilizer for consistent profiling
Simple GPU clock stabilizer for consistent profiling - milkru/gpu_clock_stabilizer
github.com
December 4, 2025 at 5:52 PM
Since posting my debugging tale, I've learned more:

- I can use an NVIDIA stats HUD to show dynamic changes to the GPU clock rate (which are very large).

- A D3D12 method, SetStablePowerState, is available to disable these dynamic changes.

Some numbers below!

1/
December 3, 2025 at 12:09 AM
Reposted by Mike Turitzin
🌶️ Hot take: ML-based graphics makes some graphics researchers unhappy for the same reason diffusion models make artists unhappy.

Both automate the interesting and beautiful parts of the work and both deskill the worker. Both result in questionable quality and both are being adopted regardless.
The best quote I’ve heard about AI was a half-joke by a coworker: “is there anything that classical techniques can do that AI can’t pretend to do better?” Sometimes pretending is good enough and sometimes it’s really not! That seems largely lost in the pro/anti AI discourse.
December 2, 2025 at 5:32 PM
A pretty wild debugging story:

When updating Dawn (Chrome's WebGPU lib), I saw a +50% jump in GPU timings for most/all of my GPU timers (measuring draws, dispatches, etc.).

I bisected Dawn's commit history to find the commit where the perf regression happened, and it ...

1/
December 1, 2025 at 9:24 PM
Added support for loading block-compressed GPU texture formats in my engine via the KTX format / library.

github.com/KhronosGroup...

The lib is not super well documented but pretty easy to use and hook up to WebGPU - e.g., to load HDR cubemaps, 3D textures, etc.
GitHub - KhronosGroup/KTX-Software: KTX (Khronos Texture) Library and Tools
KTX (Khronos Texture) Library and Tools. Contribute to KhronosGroup/KTX-Software development by creating an account on GitHub.
github.com
November 24, 2025 at 8:52 PM
An underrated use of RenderDoc is just checking that your engine is loading an asset properly :)
November 19, 2025 at 1:03 AM
I am reading about Live++ works from the presentation linked on this page, and it kind of insane. (C++ hot reload that patches code in place vs. just reloading a DLL)

liveplusplus.tech/features.html
Live++ | Features
Hot-reload C and C++ applications.
liveplusplus.tech
November 18, 2025 at 7:27 PM
This article is a great dive into the nuts and bolts of creating one of those tiny (but neat) shaders.

Both in terms of algorithms and GLSL character minimization!

blog.pkh.me/p/45-code-go...
November 12, 2025 at 9:29 PM
A new video of a wobbly cube that's rendered via ray-marching a discretized SDF. Hypnotic!

Distances are reconstructed via trilinear interpolation of cached values on a grid.

This is the equivalent of what was shown in my earlier 2D animations (see below!)
November 11, 2025 at 11:17 PM
New take on the tunnel gun:

Make a tunnel, walk through it, and then close it up behind you.

Going to experiment with this for gameplay in a mining context.
November 7, 2025 at 8:41 PM
Demo of bilinear interpolation of SDF samples:

- Negative (interior) samples of the analytic SDF are blue, positive (exterior) samples are orange.

- Circles are drawn around samples to show distance magnitude.

- Intermediate bilinear interp samples / segments are drawn.

1/
November 5, 2025 at 10:25 PM
Making an animation illustrating sparse allocation of SDF bricks:

- White line is the analytic SDF curve.

- Sparsely-allocated cells (and distance samples) are shaded.

- Yellow line in the reconstructed SDF curve from cached samples (via bilinear interpolation of distances).
October 30, 2025 at 7:33 PM
Just learned that the equivalent of "warp"/"wave" in ispc is a "gang".

"Gangs of Program Instances" has a certain menacing ring to it 😁
October 30, 2025 at 5:49 PM