This is a project I started to learn more about vulkan API. I started off just creating a regular glTF model viewer, but kept adding features, and it became more of a playground for exploration on rendering.
Visual Studio (Tested only on Visual Studio 2019) NVidia GPU (for RTX)
### Clone the repo and checkout to the latest branch
git clone --recursive https://github.com/jacquespillet/vulkan.git
cd vulkan
### Generate the solution
mkdir build
cd build
cmake ../
### Build
cd ..
Build.bat
First build may take a while because it's going to build all the dependencies with the project.
VulkanApp.exe "path/to/your/model.gltf"
you can add another parameter to set the global scale of the scene, like so :
VulkanApp.exe "path/to/your/model.gltf" 0.01
It has 6 different "renderers" available :
-
Forward : The simplest one, it just does forward rendering using the vulkan graphics pipeline. It's using a pbr material shader. It also supports image based lighting, and directional lighting.
-
Deferred : Simple Deferred rendering pipeline, just to understand how offscreen render targets work in vulkan It also supports image based lighting, and directional lighting.
-
Path Tracer RTX A path tracer that uses the hardware acceleration features on new NVidia RTX gpus. It can also use Open Image Denoise to denoise the renders. It's a simple path tracer, but still able to produce some good looking images!
-
Path Trace CPU Well, that's the same path tracer as the previous one, but using the GPU.
As it cannot benefit from hardware accelerated ray tracing, it's using a custom BVH based on the great BVH series by Jacco Bikker.
- Rasterizer CPU
As the title says, it's a rasterizer that runs on the cpu that renders the scene. It really has a limited set of features : Only draws the triangles with a simple lighting algorithm.
It is based on tinyRenderer
- Path Tracer Compute
That's a path tracer that runs in a compute shader, and that doesn't use the hardware acceleration for ray tracing.
It also uses the same BVH structure as the cpu path tracer, and produces the same results as the other 2 path tracers.
The materials can be edited live in the editor
Pixel perfect object selection, and ability to move objects in the scene using (ImGuizmo)[https://github.com/CedricGuillemet/ImGuizmo]
Sponza by Frank Meinl, from glTF Samples
Damaged Helmet by theblueturtle_, from glTF Samples
Isometric Office by Companion_Cube