The RHI is a thin, opinionated abstraction layer over modern graphics APIs (Direct3D 12 and Vulkan).
Its core job is to provide a simple and portable interface.
"Portable" means the abstractions are implementable on other graphics APIs without requiring changes to engine code. There is no #ifdef chains or per-platform rendering paths anywhere.
It targets the hardware that users actually run today — not 15 years old legacy GPUs, not the highest-end enthusiast stuff. Only the features that match that practical hardware range are exposed.
The Vulkan backend is not implemented yet.
The RHI was inspired by The-Forge but adopts different trade-offs that match the engine's goals. We're slowly moving towards no graphics api direction where possible.
The key principles:
All shaders are written in HLSL 2021 regardless of backend. A shared header RHI.esh provides macros and utilities so that shader code stays backend-agnostic.
There is no D3D11, OpenGL, or any pre-D3D12/Vulkan path. The minimum D3D feature level is 12_0.
This lets bindless resources be used everywhere and keeps backend implementations simple.
Mesh shaders replace geometry shaders entirely. If you need tessellation, do it in a compute shader.
The available pipeline combinations are vertex + pixel, mesh + pixel, and compute.
There is no built-in shader compiler, pre-compiled binary bytecode blobs are consumed directly. Actual shader compilation happens on the engine side.
Shader reflection data is extracted from the bytecode and surfaced to the engine through ShaderReflection and PipelineReflection.