Lone Henchman

Sometimes about tools, sometimes about graphics, sometimes I just ramble.
A stylized picture of the author.

My name's Phill, and I'm a video game programmer.

Sometimes I write code (and a little bit of it even makes it onto GitHub). Sometimes I solder microcontrollers to LED strips. Sometimes (rarely - too rarely) I even write stuff here.

This site's a little broken right now. Sorry about that. As far as I can tell, my old hosting provider was, uh, unhappy to discover that they'd given me a really good indefinite promotional rate (or something like that) which I'd held onto for longer than they intended, so I'm rebuilding it bit by bit in my spare time on Azure. Good times.

No, none of this content was produced by LLM. Spelling mistakes and awkward sentences are my own. I don't have a proofreader and figuring out how to integrate a spell checker into the (somewhat clunky) workflow behind this site is still on my to-do list.

Contact

I can sometimes be reached at phill@vec3.net, but absolutely never on social media. LinkedIn exists in a superposition of being social media and being not social media.

Recent posts

Working Around Driver Bugs: Fixing SPIR-V Assembly With Regex

Recently, I worked around a Vulkan driver bug on my Quest 3 by writing code that throws regular expressions at SPIR-V assembly until it's in the right form to make the driver happy. Some of you might not have enjoyed reading that sentence. Those who just dislike the unfamiliar tech jargon are the lucky ones. The rest are already feeling my pain, and this first paragraph isn't even over yet. It's (horror) story time - but you might learn a little about SPIR-V along the way if you stick around. I sure did.

Read more...

Optimizing lz4_stream for Uncached Memory

The loading side of my content framework relies heavily on compression, but it also relies on the compression library being able to pause and resume (in the way that the standard zlib and LZMA interfaces allow), which isn't (wasn't?) available with LZ4 back when I first adopted the format. So I wrote my own LZ4 decoder to support just that. Unfortunately, I recently hit a really bad performance snag.

Read more...

How to decode LZ4

As background for the following post in this series, I need to describe the LZ4 format and how to decode it. This was going to be part of the next post, but it got way too big. And, anyway, maybe this will be of use to someone on its own, and it'll be easier to find here than in the middle of a wall of text.

Read more...

Vulkan Memory Types

Picking up the discussion on memory and caching: how does this all interact with an external processor such as a GPU? GPUs are an intersting addition to this discussion because their operation is very memory-bound and very very multi-core. They also run alongside CPUs. This makes things ...complicated.

Read more...

How Cache Impacts Software

Knowing that main memory is slow (relative to what otherwise goes on in the CPU), software can do a few things to run faster. These things all boil down to just "work with the CPU's cache and don't ever fight it".

Read more...

Memory and Physics

Computers have both a superpower and a problem: they are physical objects. And what the laws of physics give in terms of the massive potential to do work in parallel, they take away in the speed-of-light limit and heat. All of this has to be engineered around.

Read more...

Building Content: Parameter Packs and their C# Code Generators

In an earlier post in this series I worte about content identity being tied to the parameters used to build that content. This means that the parameter packs which drive builders are one of the major load-bearing elements of the overall design. In this post I'll describe the C# compiler plugin which makes their implementation both easier and much more reliably correct.

Read more...

This Website: Optimizing Resource Inclusion

One of the perks of making your own stuff is that some days you get to make it do neat things. Yesterday was such a day. I've long been annoyed at having every page linking in every possible script (highlight.js, MathJax, etc) just in case there might be content on that page that needs it. But now that I'm in full control of the site's generator, it was easy to just fix it.

Read more...

Rendering an Infinite Grid

I've been working on a little VR project for a while, and one of the first things I needed at the start was something to stand on. So I made an infinite grid to be my floor. Here's what it looks like and how it's made.

Read more...

This Website: The Generator

All of the code I'm going to discuss here is available on GitHub. Links to specific bits of code will point at what is currently the HEAD commit - things will naturally move and change as time passes.

Read more...

This Website: The Story So Far

This site's source is now available on GitHub and the generator component is even open-source. To mark the occasion, I thought I'd write a bit about its history and the journey from WordPress to a fully static site.

Read more...

$msCompile problemMatcher Woes

I don't know why no one bothers to keep "problemMatcher": "$msCompile" working as tools like dotnet and MSBuild evolve, but here we are. Every now and then an SDK update breaks the problem matcher, making it harder to get .NET work done in VS Code.

Read more...

Building Content: Scripting With C#

A few weeks ago I wrote about my toy content builder. Today, I'm writing a little bit more about it.

Read more...

Camera Math

Updated: 10 Aug 2025

Nothing special here, just stashing away some math I don't enjoy having to look up again and again.

Read more...

Dynamic Descriptor Pools

A couple days ago I wrote about my dynamic_buffer helper which I use to push things like uniform blocks to the GPU without worrying too much about preallocating the exact amount of memory I need at application startup. Here's another helper which I use to make allocating descriptor sets easy.

Read more...

Don't Forget the Inline!

If you're writing a header file and you're at global or namespace scope, then you almost certainly do not mean to declare bare const or constexpr variables.

Read more...