Vulkan Samples
This repository holds many samples, showing various aspect of Vulkan, debugging tips and usage of other Nvidia tools.
Most of the samples have for starting point, the base_sample sample. They are applying a few modifications to that base sample to illustrate the modifications required to enable the feature or what need to be demonstrate.
Each sample have its own documentation written in Markdown describing what was modified and where to get more information.
Build
Easy Method (Windows)
Clone this repository
git clone https://github.com/nvpro-samples/vk_samples.git
- Deploy.bat : pull and update all dependencies.
- Build.bat : build all projects in release and optionally to debug.
- Install.bat : copy the binaries and dlls to the
_Install
directory.
Hand Made
git clone --recursive --shallow-submodules https://github.com/nvpro-samples/nvpro_core.git
git clone https://github.com/nvpro-samples/vk_samples.git
Generate solution
cd vk_samples
mkdir build
cd build
cmake ..
Note: If there are missing dependencies in nvpro_core
, run the following command in nvpro_core directory.
git submodule update --init --recursive --checkout --force
Extra SDK
Some samples depend on other SDKs. They are only required if you intend to build these projects.
- OptiX 7.3+ : OptiX denoiser
- Cuda 10.x : OptiX denoiser
- Nsight Aftermath : Aftermath
Samples
Base Sample
Extensions: VK_KHR_ray_tracing_pipeline
, VK_KHR_acceleration_structure
, VK_KHR_ray_query
, VK_KHR_deferred_host_operations
, VK_KHR_buffer_device_address
This is a simple but complete Vulkan sample. It loads glTF scenes and renders using rasterizer or ray tracer. Note, at some point, the other samples were created from this one.
Aftermath SDK
Extensions: VK_NV_device_diagnostics_config
, VK_NV_device_diagnostic_checkpoints
Adding Aftermath SDK to automatically generate GPU crash dump when a there is a device lost. Dumps are written before the computer crashes and can be inspected in Nsight Graphics.
Inherited Viewport
Extensions: VK_NV_inherited_viewport_scissor
Using the inherited extension to avoid re-generating multiple recorded command buffers for different viewport sizes.
Multi-Sampling Anti-Aliasing (MSAA)
Using multi-sampling anti-aliasing in efficient way for the rasterizer.
Shader Debug Printf
Extensions: VK_KHR_shader_non_semantic_info
Adding debug printing information directly in the shader code.
OptiX Denoiser
Extensions: VK_KHR_synchronization2, VK_KHR_external_memory
Using the OptiX denoiser on the path traced image to remove residual noise.
HDR sampling
High Dynamic Range image sampling is added to the base sample for both raster and ray trace, using multiple importance sampling acceleration structure and convoluted cubemaps.
LICENSE
Copyright 2021 NVIDIA CORPORATION. Released under Apache License, Version 2.0. See "LICENSE" file for details.