This repository contains a custom DirectX 12 rendering engine developed for a university course (DV2551 - 3D Programming III). The project implements screen-space raymarched volumetric fog using both a traditional Pixel Shader approach and a Compute Shader approach in order to compare performance between the two.
- Windows 10/11
- CMake
- DirectX 12 compatible GPU
- Clone or download the repository and navigate to the root directory.
- Generate build files:
cmake -B build- Compile the project:
cmake --build build --config Release - Run the generated executable located in the
build/Releasedirectory.
W - Move camera forward
A - Move camera left
S - Move camera backward
D - Move camera right
Space - Move camera up
Left Shift - Move camera down
F - Toggle between Pixel Shader and Compute Shader fog
G - Toggle volumetric fog on/off
1 - Set raymarching steps to 2
2 - Set raymarching steps to 4
3 - Set raymarching steps to 8
4 - Set raymarching steps to 16
5 - Set raymarching steps to 32
6 - Set raymarching steps to 64
7 - Set raymarching steps to 128
ESC - Close the application
/srccontains all C++ headers and source files./src/Renderer.cppcontains most of the rendering code./src/shaderscontains all HLSL shaders./src/shaders/VolumetricFogPS.ps.hlslcontains pixel shader volumetric fog implementation./src/shaders/VolumetricFogCS.cs.hlslcontains compute shader volumetric fog implementation./D3D12contains the DirectX 12 Agility SDK includes and binaries.