the billie blog

Silly: The Eternal Fragment Shader

June 09, 2026

overview

A friend recently introduced me to the Eternal Software Initiative. It’s pretty snazzy and I hope to see initiatives like this continue to grow in the future.

The main thing that interests me about this project is its use of a subleq+ single instruction virtual machine. This opcode is defined as such:

mem[b] = mem[b] - mem[a]
if mem[b] ≤ 0 then
    pc ← c
glorious subleq+!

I strongly enjoy putting things on the GPU that ought not be on the GPU. I think it would be very fun(ny) to implement a virtual machine that meets the Eternal Software Initiative VM spec entirely in a fragment shader; the only memory the fragment shader may access would be the previously rendered frame, the only memory it could write is the next frame.

goals

By the end of this project I’d like to run a simple program (compiled to ESI spec) entirely on the GPU using a fragment shader.

Or an Arch Linux install!

Of course, this is all horribly inefficient and a gross neglect of GPU mass parallelism, but who’s to say how power-glut GPUs will be by the time I get around to this! It might even run in half real time!

Game: Sisyphus House