| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The build_all repository is optional and contains scripts that allow you to synchronize and build all the samples that you have cloned using a single solution.
Running the clone_all batch/script will create the following directory structure:
📂 build_all
📂 nvpro_core
📂 nvpro_core2
📂 samples
📂 ... (all repositories specified in the script)
Each sample can be built either individually, using build_all.bat to automate the process, or with build_all/CMakeLists.txt to build them all as a single solution.
You can also configure the solution for build_all to only include a subset of projects with the appropriate BUILD_sample_name checkbox in the CMake UI. build_all/legacy/CMakeLists.txt will build only the samples not yet ported to nvpro_core2.
All samples must be built for a 64-bit architecture. All samples support Windows (MSVC 2019 is our minimum compiler), while nearly all support Linux as well (GCC 10.5 is our minimum compiler there). If you're using a compiler other than MSVC (Visual Studio), GCC, or Clang, your compiler must allow specifying C++20, and provide support for some basic C++20 features such as designated initializers.
The samples attempt to pull in third-party dependencies automatically. But there are a few system libraries they depend on. CMake may not pick up all dependencies during the setup phase and compilation will bail out due to missing headers. The following line installs many of the potentially missing system library headers and libraries:
sudo apt-get install libx11-dev libxcb1-dev libxcb-keysyms1-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev libtbb-dev libxkbcommon-devInstalling the latest Vulkan SDK is recommended. Please follow the instructions on https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html under "Download the SDK" and "Install the SDK".
Additionally, the samples require CMake 3.22 or higher.
nvpro_core: The primary framework that all samples depend on. Contains window management, UI, and various API helpers.
nvpro_core2: The next-gen version of nvpro_core, modernized and cleaned up.
This repository contains numerous examples demonstrating various aspects of Vulkan, debugging techniques, and integration with other NVIDIA tools:
and many more.
Vk_slang_editor is a shader-driven livecoding tool using Vulkan and the Slang shading language. It lets you write Slang shaders, compile them, and quickly see and interact with the result.
Notably, it lets you write multi-pass pipelines in a single file, add arbitrary shader parameters, load meshes and textures; and much more -- while Slang's language features can make writing complex or large shaders easier.
It also includes a collection of example shaders covering topics including compute shaders, autodifferentiation, particle systems, and more.
This sample introduces clusters and shows how to use the VK_NV_cluster_acceleration_structure extension to ray trace massive, animated scenes. It also shows how clusterized models can be efficiently rasterized using mesh shaders. With RTX Mega Geometry, acceleration structures for animated objects can be built faster than using previous APIs.
Tags: ray tracing, clusters, mesh shaders, animation, glTF, CLAS, RTX Mega Geometry
This sample showcases a continuous level of detail (LoD) technique using clusters that leverages VK_NV_cluster_acceleration_structure for ray tracing. It can also rasterize the content using VK_NV_mesh_shader. Furthermore, the sample implements an on-demand streaming system from RAM to VRAM for the geometry.
Tags: ray tracing, clusters, mesh shaders, glTF, CLAS, RTX Mega Geometry
This sample showcases how to use clusters and VK_NV_cluster_acceleration_structure to path trace dynamic tessellation with displacement, which requires per-frame generation of geometry. It can also render the content using VK_NV_mesh_shader.
Tags: ray tracing, clusters, mesh shaders, glTF, CLAS, RTX Mega Geometry
Frequently, only parts of a scene change between frames. The new VK_NV_partitioned_acceleration_structure extension allows apps to rebuild parts of a TLAS when part of a scene changes, rather than the whole thing. This sample showcases this extension using a simple simulation of more than 100 000 physics objects.
Tags: ray tracing, TLAS, RTX Mega Geometry, toon shading
nv_cluster_builder is a small generic spatial clustering C++ library, created to cluster triangle meshes for ray tracing. It implements an algorithm similar to the recursive node-splitting techniques sometimes used to create bounding volume hierarchies. While it is limited to axis-aligned splits, its outputs work well for ray tracing.
Tags: clusters, RTX Mega Geometry
nv_lod_cluster_builder is a continuous level of detail (LoD) mesh library that enables fine-grained control over geometric detail within a mesh, compared to traditional discrete LoD. Clusters of triangles are carefully precomputed by decimating the original mesh in a way that they can be seamlessly combined across different LoD levels. At rendering time, a subset of these clusters can be selected to adaptively provide the required amount of detail as the camera navigates the scene.
Tags: clusters, RTX Mega Geometry
A tutorial that explains step-by-step what is needed to add ray tracing to an existing Vulkan application. The first tutorial is the base of ray tracing, and from this base, many other tutorials explain the various features of RTX.
Tags: ray tracing, OBJ, tonemapper, BLAS, TLAS
A beginner-friendly Vulkan path tracing tutorial in under 300 lines of C++. Intended as both an introduction to Vulkan, and as an introduction to computer graphics through ray tracing. Includes tips and tricks along the way, and extra chapters show how to extend the path tracer, implement production techniques, and use a performance analysis tool. Dovetails into vk_raytracing_tutorial_KHR.
Tags: ray tracing, path tracing, ray queries, ray tracing pipelines, compute shaders, debug printf, BLAS, TLAS, OBJ, beginner
This example demonstrates DLSS-RR, "Deep Learning Super-Sampling Ray Reconstruction", in a simple path tracer rendering a glTF scene. DLSS-RR is a real time, deep learning powered denoiser and upscaler which removes image noise typically produced by Monte-Carlo based path tracers.
Tags: ray tracing, path tracing, glTF, denoiser, DLSS, DLSS-RR, Vulkan
This example demonstrates NRD, "NVIDIA Real-Time Denoisers", in a simple path tracer rendering a glTF scene. NRD is a spatio-temporal post-processing library that removes noise from Monte-Carlo based path tracers. NRD is not just a single denoiser, in fact it is a collection of specialized denoisers for specific kinds of data, like diffuse and specular images, ambient occlusion, and shadow data.
Tags: ray tracing, path tracing, glTF, denoiser
This example is a simple version of vk_gltf_renderer. After a few iterations, the image will be denoised using the OptiX denoiser. To achieve this, we use interop between CUDA and Vulkan. Vulkan images are converted to CUDA buffers and converted back after being denoised. This pass is inserted between other rendering passes.
Tags: ray tracing, path tracing, glTF, HDR, tonemapper, picking, BLAS, TLAS, PBR material, denoising, CUDA, interop, OptiX
A comprehensive Vulkan-based glTF renderer featuring a fully-featured PBR path tracer with a simpler raster fallback. The path tracer provides complete support for the glTF 2.0 specification with advanced rendering techniques including image-based lighting (IBL), importance sampling, reflections, transparency, indirect illumination, and depth-of-field effects simulating realistic camera lens behavior.
Comprehensive support for official Khronos (KHR) extensions including:
Extension:
Tags: ray tracing, glTF, HDR, tonemapper, picking, BLAS, TLAS, PBR material
In Vulkan lifetime management such as deleting resources is a bit more complex than in OpenGL. The basic sample describes a strategy that delays deletion of Vulkan resources for a few frames. Furthermore Vulkan provides multiple ways to upload data to the device, three different approaches are described.
Tags: synchronization
In this sample the functionality of the VK_NV_device_generated_commands is demonstrated. This extension greatly enhances the indirect drawing capabilities and adds the ability to change shaders on the device. Furthermore the usage of bindless buffers is shown, as an alternative to the classic descriptor set binding model.
Tags: Device Generated Commands, glTF, synchronization, bindless
Shows how to render per-part IDs efficiently. This can be used for selection for or id/item-buffer rasterization where a pixel represents each part uniquely.
Tags: idbuffer, item buffer, optimization, selection highlight
Tags: transparency, subpasses, MSAA, algorithms
Rendering object outlines and details from canvases render with rasterizer or ray tracer.
Tags: silhouette, contour, toon shading, post-process, fxaa, antialiasing
Demonstrates a customizable cache-aware mipmap generation algorithm using compute shaders. Includes the nvpro_pyramid library, which can be used independently of this sample with no dependencies besides standard C++ and Vulkan. Supports non-power-of-2 textures while outperforming the conventional blit algorithm.
Tags: mipmapping, image processing, compute shaders, library, subgroups, procedural
Demonstrates multi-GPU rendering and presenting to ddisplays (direct displays) — displays that are not part of the Windows desktop, and of which an application takes complete control.
Tags: ddisplay, NVIDIA Mosaic
Demonstrates how to use the VK_NV_inherited_viewport_scissor extension to redraw scenes with dynamically changing scissor and viewport settings without having to re-record secondary command buffers.
Tags: optimization, indirect draw, instancing
Shows how to use the Vulkan memory decompression extension (VK_NV_memory_decompression) to compress and decompress with NVIDIA GDeflate, using the NVIDIA fork of libdeflate.
Tags: compression
Simple offline application which uses Vulkan to render without opening a window.
Tags: compute shader, offline rendering
Demonstrates integration of Streamline into a Vulkan-based application and using it to add NVIDIA Reflex, DLSS Super Resolution, and DLSS Frame Generation.
Tags: optimization, upscaling, antialiasing, latency, post-process, image processing
Provides a concrete example of how timeline semaphores and asynchronous compute-only queues can be used to speed up a heterogeneous compute/graphics Vulkan application.
Tags: synchronization, compute shaders, procedural
Encodes and decodes video with an all-Vulkan end-to-end pipeline using the Vulkan Video APIs.
Tags: video, image processing
Shows how to distribute rendering of a scene across multiple GPUs using NVIDIA SLI, and how to present to an OpenXR runtime or a standard window.
Tags: optimization, virtual reality, multi-GPU, synchronization
This project serves as proof of concept how to simplify the usage of VK_EXT_descriptor_indexing and GL_EXT_nonuniform_qualifier within GLSL (typically used in combination with VK_NV_ray_tracing). A Lua script generates structures and function overloads to hide the code for indexing descriptor sets of samplers and textures.
These samples use the gl_vk_ prefix and showcase Vulkan and OpenGL techniques within the same application (gl_vk_sample_name.exe) or just Vulkan alone (vk_sample_name.exe). If available, using the BUILD_gl_vk_sample_name_VULKAN_ONLY option, you can omit building the combined executable file. The VULKAN_ONLY mode uses Vulkan's WSI system to create the swapchain, the combined executable uses GL_NV_draw_vulkan_image.
This OpenGL/Vulkan sample illustrates the use of mesh shaders for rendering CAD models.
Rendering an animated image using a Vulkan compute shader and displaying this image using OpenGL on an animated triangle. The image is allocated with Vulkan and shared using Interop.
Using Vulkan transfer queues to enable truly asynchronous texture- and buffer transfers in OpenGL
This example is adding ray traced ambient occlusion in an OpenGL scene. All buffers are shared between OpenGL and Vulkan to create the acceleration structure needed to ray trace. Rays are sent from the G-Buffer position rendered by the OpenGL rasterizer.
This example shows how to use Vulkan Direct Display functionality from an OpenGL renderer. A Vulkan Direct Display class provides render textures to an OpenGL renderer, which after rendering submits the textures back to the Vulkan class for presentation on the Direct Display device.
Tags: ddisplay, interop
OpenGL sample on various rendering approaches for typical CAD scenes. Stresses CPU bottlenecks due to lots of low-complexity drawcalls.
Basic sample for NV_command_list
GPU classifies how to render millions of particles. Close/large particles use tessellation, medium sized particles use an optimized instancing technique and distant particles are rendered as points. No CPU readbacks needed.
Shows how to use Single Pass Stereo and Multi-View Rendering. These draw multiple views at once, reducing CPU overhead.
Tags: optimization, virtual reality
Basic sample showcasing multicast capabilities, where one GL stream is very efficiently sent to multiple GPUs. Typical use-case is for example VR SLI, where each GPU renders a different eye.
Tags: optimization, virtual reality
Sample for shader-based occlusion culling, which is more scalable on modern GPUs than traditional occlusion query techniques. Also showcases how to generate drawcalls on the GPU, so that occlusion culling techniques don't need CPU readbacks.
Example of how to use path rendering; and how to use it with CMYK (using multi-render target)
Optimized screen-space ambient occlusion, cache-aware HBAO
Demonstrates Variable Rate Shading — which allows hardware to shade primitives at a different frequency than the rasterization frequency — in OpenGL. The user can pick various rates, including shading rates that vary over the image. This is especially useful for optimizations like foveated rendering in VR.
Tags: optimization
Sample showing OpenGL and CUDA interop. Explain how to mix CUDA as compute backend and OpenGL for displaying in the same application.
This project explores real-time visualization of 3D Gaussian Splatting (3DGS) with Vulkan, comparing rasterization-based techniques using mesh and vertex shaders, along with GPU and CPU sorting strategies.
This sample demonstrates the usage of the new NvAPI interface to synchronize present calls between windows on the same system as well as on distributed systems. It can also be used to check if systems are configured to support synchronized present through DirectX 12 present barrier. A general overview of the interface can be found on the NVIDIA developer blog.
Tags: synchronization
Shows how to correctly load the NVML library for GPU information, and to robustly check using NVML's API if a GPU is an Enterprise/Quadro GPU. (This works even when the GPU, such as the RTX A6000, doesn't have "Quadro" in its name.)
(full resolution compression comparison here)
Shows how to use NVTT 3, a GPU-accelerated texture compression and image processing library. This includes several small samples intended as tutorials — such as a program that uses NVTT to load an image and compress it to a one-mipmap DDS file using BC7 block compression in less than 250 C++ characters — and the source code for several tools from NVTT 3 ported to the nvpro-samples framework.
Tags: compression, image processing, CUDA
This is a set of advanced samples for the NVIDIA OptiX Ray Tracing Engine. They assume some previous experience with OptiX and physically based rendering, unlike the basic tutorial-style samples in the SDK directory of the OptiX 4.0 distribution.
Tags: ray tracing, path tracing, OptiX, BLAS, TLAS
| Back | FazBrowse Home | New Git URL |