All Projects → nvpro-samples → Vk_mini_path_tracer

nvpro-samples / Vk_mini_path_tracer

Licence: other
A beginner-friendly Vulkan path tracing tutorial in under 300 lines of C++.

Projects that are alternatives of or similar to Vk mini path tracer

Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+257.6%)
Mutual labels:  vulkan, raytracing
awesome-rtx
Curated collection of projects leveraging NVIDIA RTX technology (OptiX, DXR, VKR)
Stars: ✭ 73 (-87.81%)
Mutual labels:  vulkan, raytracing
Vk raytracing tutorial
Vulkan ray tracing tutorials
Stars: ✭ 144 (-75.96%)
Mutual labels:  vulkan, raytracing
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-86.98%)
Mutual labels:  vulkan, raytracing
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-95.99%)
Mutual labels:  vulkan, raytracing
Vk raytrace
Ray tracing glTF scene with Vulkan
Stars: ✭ 91 (-84.81%)
Mutual labels:  vulkan, raytracing
Lift
Vulkan Path Tracer with Optix Denoiser integration
Stars: ✭ 30 (-94.99%)
Mutual labels:  vulkan, raytracing
Wickedengine
3D engine focusing on modern rendering techniques and performance.
Stars: ✭ 3,148 (+425.54%)
Mutual labels:  vulkan, raytracing
vulkan-raytracing
"Simple" Vulkan raytracing
Stars: ✭ 27 (-95.49%)
Mutual labels:  vulkan, raytracing
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (-60.77%)
Mutual labels:  vulkan, raytracing
Gears Vk
Powerful low-level C++20 rendering framework for Vulkan 1.2, including Real-Time Ray Tracing (RTX) support, built atop Auto-Vk.
Stars: ✭ 71 (-88.15%)
Mutual labels:  vulkan, raytracing
Quartz
Vulkan RTX path tracer with a declarative ES7-like scene description language.
Stars: ✭ 367 (-38.73%)
Mutual labels:  vulkan, raytracing
Vk denoise
Denoising a Vulkan ray traced image using OptiX denoiser
Stars: ✭ 41 (-93.16%)
Mutual labels:  vulkan, raytracing
Raytracedshadows
This demo implements BVH construction and GPU traversal for rendering hard shadows.
Stars: ✭ 107 (-82.14%)
Mutual labels:  vulkan, raytracing
zig-gamedev
Building game development ecosystem for @ziglang!
Stars: ✭ 1,059 (+76.79%)
Mutual labels:  vulkan, raytracing
Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (-56.09%)
Mutual labels:  vulkan, raytracing
Vk raytracing tutorial khr
Ray tracing examples and tutorials using VK_KHR_ray_tracing
Stars: ✭ 461 (-23.04%)
Mutual labels:  vulkan, raytracing
Vulkan Forward Plus Renderer
Forward+ renderer in Vulkan using Compute Shader. An Upenn CIS565 final project.
Stars: ✭ 513 (-14.36%)
Mutual labels:  vulkan
Rlsl
Rust to SPIR-V compiler
Stars: ✭ 546 (-8.85%)
Mutual labels:  vulkan
Gfx
[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
Stars: ✭ 5,045 (+742.24%)
Mutual labels:  vulkan

logo

vk_mini_path_tracer

A relatively small, beginner-friendly path tracing tutorial.

▶️ Load the tutorial! ◀️

This tutorial is a beginner-friendly introduction to writing your own fast, photorealistic path tracer in less than 300 lines of C++ code and 250 lines of GLSL shader code using Vulkan. Here's an example of what you'll render at the end of this tutorial!

Vulkan is a low-level API for programming GPUs – fast, highly parallel processors. It works on a wide variety of platforms – everything from workstations, to gaming consoles, to tablets and mobile phones, to edge devices.

Vulkan is usually known as a complex API, but I believe that when presented in the right way, it's possible to make learning Vulkan accessible to people of all skill levels, whether they're never programmed graphics before or whether they're a seasoned rendering engineer. Perhaps surprisingly, one of the best ways to introduce Vulkan may be with GPU path tracing, because the API involved is relatively small.

We'll show how to write a small path tracer, using the NVVK helpers, included in the nvpro-samples framework, to help with some Vulkan calls when needed. For advanced readers, we'll also optionally talk about performance tips and some of the implementation details inside the helpers and Vulkan itself.

The final program uses less than 300 lines of C++ and less than 250 lines of GLSL shader code, including comments. You can find it here.

Here are all the Vulkan functions, and NVVK functions and objects, that we'll use in the main tutorial:

Vulkan Functions
vkAllocateCommandBuffers vkBeginCommandBuffer vkCmdBindDescriptorSets
vkCmdBindPipeline vkCmdDispatch vkCmdFillBuffer
vkCmdPipelineBarrier vkCreateCommandPool vkCreateComputePipelines
vkDestroyCommandPool vkDestroyPipeline vkDestroyShaderModule
vkFreeCommandBuffers vkGetBufferDeviceAddress vkQueueSubmit
vkQueueWaitIdle vkUpdateDescriptorSets
NVVK Functions and Objects
nvvk::AllocatorDedicated nvvk::BufferDedicated NVVK_CHECK
nvvk::Context nvvk::ContextCreateInfo nvvk::createShaderModule
nvvk::DescriptorSetContainer nvvk::make nvvk::RayTracingBuilderKHR

Chapters

Chapter
small
Hello, Vulkan!
small
Device Extensions and Vulkan Objects
small
Memory and Commands
small
Writing an Image
small
Compute Shaders
small
Descriptors
small
Acceleration Structures and Ray Tracing
small
Four Uses of Intersection Data
small
Accessing Mesh Data
small
Perfectly Specular Reflections
small
Antialiasing and Pseudorandom Number Generation
small
Diffuse Reflection

Extra Chapters

These are optional, extra tutorials that show how to polish and add new features to the main tutorial's path tracer. Make sure to check out the list of further Vulkan and ray tracing resources at the end of the main tutorial as well!

Extra Chapter

Gaussian Filter Antialiasing

Measuring Performance

Compaction

Including Files and Matching Values Between C++ And GLSL

Push Constants

More Samples

Images

Debug Names

Instances and Transformation Matrices

Multiple Materials

Ray Tracing Pipelines

Building and Running

Please see the instructions here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].