Rendering both opaque and translucent objects using Weighted Blended OIT in Vulkan. In screenshot, there are 25 opaque and 100 translucent objects.
This project requires support for C++20 modules and the C++23 standard library. The supported compiler is:
- Clang 18.1.2
- MSVC 19.40
Additionally, the following build tools are required:
- CMake 3.30
- Ninja 1.11
This project depends on:
- GLFW
- glm
- My own Vulkan-Hpp helper library, vku (branch
module
), which has the following dependencies:
Dependencies will be automatically fetched using vcpkg.
Tip
This project uses GitHub Runner to ensure build compatibility on Windows (with MSVC), macOS and Linux (with Clang). You can check the workflow files in the .github/workflows folder.
This project, along with its dependency vku
, supports vcpkg for dependency management. Follow these steps to build the project:
git clone https://github.com/stripe2933/vk-weighted-blended
cd vk-weighted-blended
cmake --preset=default # Or use your own configuration preset that inherits from the "default" preset.
cmake --build build -t vk-weighted-blended
The executable will be located in the build folder.
All shaders are located in the shaders folder and need to be manually compiled into <shader-filename>.spv
before the application launch. To make this easier, script files are available for you:
- For bash users, run the
compile.sh
script. - For Windows users, run the
compile.bat
batch file.
Screenshot from Xcode Metal Debugger.
Note that this application uses 4x MSAA, therefore each color attachments have their own resolve attachments, and they are not stored for the next subpass usage.
This project is licensed under the MIT License. See the LICENSE file for details.