← Back

Render Hardware Interface

In early 2026, I realized that a lot of my experience doing 3D work was mainly using abstractions made by three.js or some other rendering library. I didn't like that, so I decided that I wanted to learn some more lower level concepts.

I started off with WebGPU examples, but quickly realized that a lot of the learning online is very top-down, which is not particularly how my brain likes to function. I don't really like black boxes. So, I decided to make my own RHI.

Hello Triangle

The RHI supports D3D12, Vulkan and WebGPU. The main reason I chose this combination of APIs is that I wanted to be able to fiddle around and implement interesting new Vulkan/DX12 features and extensions (managed through the RHI itself with no real change to the user facing API), but also be able to deploy demos of my work online for people to see in the future, which could really help showcase my work. This distinction lead to me having to move a lot of the work to be controlled by the RHI rather than the user (because of how abstract WebGPU is by nature comparatively).

The RHI's shader language is HLSL, compiled to SPIR-V and DXIL for Vulkan and D3D12 respectively, and that SPIR-V is transpiled to WGSL to be used for WebGPU. There reason I chose HLSL over slang (or some other language I don't know about) is because I just wanted to learn more HLSL and write more shader code in it.

By no means is this RHI perfect or done, the current version is a V0.0.1 that I constantly find bugs and things that I've overlooked while making it. It's mainly just intended for my personal work, and maybe I'll work it up in the future and make an engine using it, who knows. I've already built a little renderer using it and the results look pretty good so far!

I plan to write a much more technical writeup about my RHI and the choices that I made in a proper blog post in the future, but in the meantime you can check it out here! it's open source.