/learnin-nvrhi

Experiments & notes while learning NVRHI

Primary LanguageC++MIT LicenseMIT

My experiments with NVRHI, a rendering abstraction & convenience library for DirectX 11, 12 and Vulkan.

If you're trying to get started with NVRHI and the Donut examples are too overwhelming, this ain't a bad place to start! I'd also recommend looking at hello_nvrhi if you need an even more barebones example.


I started doing OpenGL stuff in late 2019 and by late 2021, I got bored of OpenGL, I wanted to use something newer. Learning one of these new APIs raw seemed pretty scary to me, so after a while of trying out BGFX, DiligentCore, Vookoo and others, a fella told me to try out NVRHI.

That happened roughly in April or May 2022, and it looked like this: (you may find remnants of this wonderful little pentagon in the code)

Right now it looks like this: We got glTF loading, texture loading with stb_image, and some basic exponential fog. ^w^

Functionality todo:

  • figure out how to create a proper depth attachment for DirectX 11
  • handle resizing windows
  • test fullscreen
  • test on my 2012 Linux laptop

Experimentation todo:

  • load a BSP for benchmarking
  • mesh-based fog
  • skeletal animation

Cleanup todo:

  • speed up compile times and separate more things into smaller headers
  • simplify CMakeLists for this thing

Once some more things are done, I'll be using NVRHI as a render backend for my engine.


Licenced under MIT, with parts of code derived from Donut (DeviceManagerVK.cpp, DeviceManagerDX11.cpp, DeviceManagerDX12.cpp), licenced by nVidia under the MIT licence.