Linux in a Pixel Shader – A RISC-V Emulator for VRChat

3 months ago (blog.pimaker.at)

As someone who had a brief alternate life in VRC and made worlds - just /wow/. I had just enough grasp on Unity to make some basic things, but stuffing Linux into a pixel shader is 1 if not 2 orders of magnitude more impressive.

p.s. Udon Bird Sanctuary! I've been there!

  • It's a big differentiator with horizon worlds I think. They have an in world builder so you don't have to learn unity.

    On the other hand horizon is super restricted in what you can do, is way too heavily moderated and rubber tiled so it's not fun to be in there at all. VRChat is way better at finding the edge of what's possible. I've seen whole worlds from half Life 2 recreated etc.

    • VRChat has intriguing possibilities, but I always got the impression the underlying architecture and programming is too shoddy to really support the breadth of custom experiences people want to make. I tried various mini games or special worlds, and it was always incredibly jank and barely functional. It seemed more like problems stemming from instability or jankiness of the engine and API they were working with than anything else.

      Granted, the last time I touched it was a few years ago. Unless they've done a major rewrite of the game I don't expect it to have improved all that much. Maybe I'm wrong.

      4 replies →

Pretty amazing work!

Work like this highlights how different the compute models are between gpu and cpu. Honestly very impressed it runs as fast as it does (250khz) given those differences.

If this can be done to emulate this chip couldn't it also be done for other devices e.g old consoles?

i'm not saying people should do that, but would it be possible?

i'm misunderstanding why this is a "pixel shader" in the title, not just a programmable shader (which is more general)

  • Because that would likely be confused with compute shaders, which are not accessible in VRChat, we still regularly use geometry shaders, which as far as I know are just terrible compared to the alternatives.

    The closest to compute shaders we have are camera loops using render textures and AsyncGPUReadback which has been limited to only handle inputs and outputs in the form of textures.

    Also the reason why it is even done in shader is because the scripting language in VRChat is 200X-1000X slower than normal Unity scripting, with no async or way to do threads.

  • A programmable shader is the rectangle to the pixel shader's square, why expect the title to be intentionally vague about the constraints?