A small DirectX 12 program I use to test shaders and techniques (so windows only). It is meant to be simple and straightforward. Nothing fancy to see here: plenty of engines already exist out there. This is just a thin abstraction over DX12 so it is still important to understand its core before using it. But it makes development of demos and prototypes easier for me at least. The DX11 version of this is available here.
Features are
- Simple class helpers above DirectX 12.0 states and resources
- Simple resource upload is in place for now. Utilies a given for per frame update of dynamic textures/buffers.
- Simple RT support for mesh and material built in SBT with global and local shaders.
- Simple PSO caching.
- Live update of shaders with saving via
ctrl+s
- UI achieved with Dear ImGui
- Performance measured with GPU timers and reported in UI (tested on intel and nvidia so far)
- Simple window and input management (could be improved)
- Easy to debug with RenderDoc or nSight for instance
When cloning the project the first time:
- Update submodules (run
git submodule update
) - Open the solution
- In Visual Studio, change the Application project Working Directory from
$(ProjectDir)
to$(SolutionDir)
- Make sure you select a windows SDK and a platform toolset you have locally on your computer for both projects
- Copy dxcompiler.dll and dxil.dll from your windows SDK into $(SolutionDir) (I really need to fix that...)
- Select Application as the startup project, hit F5
Submodules
- imgui V1.85 supported (change the submodule head to the commit corresponding to the version)
Have fun and do not hesitate to send back suggestions.
Seb
PS: example of what could be improved:
- Better uploading code (do not allocate one uploading resource per texture/buffer)
- Delayed resource deletion when not needed anymore
- Better desriptors management (instead of a simple linear allocation without reuse of released elements)
- Texture mip generation
- Cubemap textures
- Sparse textures
- Mesh shaders
- etc.