A raytracer built with Vulkan and C++20 modules that supports realtime compute-shader-based raytracing with multi-bounce and multi-ray per pixel.
You can control the camera using WASD
/ Arrow
keys, and the mouse. Tab
will toggle input. Escape
will quit the application.
- Load models from glTF files
- Depth of Field
- Controls GUI
- Textures
- Texture Infrastructure
- Albedo Texture
- Normal Texture
- Metallic Texture
- Roughness Texture
- Importance Sampling
- Other methods of reducing noise
If you'd like to build without cmake, use this guide.
When building using cmake, you can run the BuildShaders
target.
Alternatively, you can also just run the following commands with ...
replaced with relevant paths and x.x.x.x
replaced with relevant version:
.../VulkanSDK/x.x.x.x/Bin/glslc.exe -fshader-stage=vertex Fullscreen.vert.glsl -o Fullscreen.vert.spv
.../VulkanSDK/x.x.x.x/Bin/glslc.exe -fshader-stage=fragment Fullscreen.frag.glsl -o Fullscreen.frag.spv
.../VulkanSDK/x.x.x.x/Bin/glslc.exe -fshader-stage=compute Raytracing.comp.glsl -o Raytracing.comp.spv
- Download and install Vulkan.
- Run CMake in the root directory of this project, where CMakeLists.txt is.
- Open the Solution.
- Open the properties for VulkanRaytracer. Set
C/C++ > Code Generation > Floating Point Model
to be blank. - Build glfw, and then build VulkanRaytracer
- LearnOpengl.com's PBR Theory Article by Joey de Vries
- Ray Tracing in One Weekend by Peter Shirley
- Physically Based Rendering: From Theory To Implementation by Matt Pharr, Wenzel Jakob, and Greg Humphreys
- Sebastian Lague's YouTube Video which provides an excellent summary over the concept of Raytracing
- Vulkan-Tutorial.com by Alexander Overvoorde and Sascha Willems
- This Vulkan Github Repository by Sascha Willems