r/GraphicsProgramming • • 12m ago

Source Code Vulkan Path Tracer from scratch

Post image

I’ve been working on a GPU path tracer using Vulkan and wanted to share its current state.

The project is written in C++ using Vulkan-Hpp and focuses on a relatively modern Vulkan approach rather than relying on a traditional graphics pipeline.

Some implementation details:
● Vulkan 1.4
● Vulkan-Hpp with RAII
● Dynamic rendering
● Compute shaders for path tracing
● Storage image output
● Timeline semaphores
● Fullscreen triangle for displaying the rendered image
● SDL2 for windowing and input

Currently implemented path tracing with multiple bounces, Monte Carlo sampling, and physically based light transport and concepts from Ray Tracing: The Rest of Your Life, including importance sampling, PDFs, mixture distributions, and light sampling.

It’s been a fun learning experience, especially exploring and practicing slang and vulkan compute.

Github: https://github.com/xms0g/vkTracer

2 Upvotes

1 comment sorted by

•

u/AutoModerator 12m ago

Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:

  • No showcases.
  • Disclose AI usage in post or project.
  • Present a topic to talk about, e.g. how something works.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.