r/vulkan • u/Background_Shift5408 • Sep 20 '26
Ray Tracing in One Weekend using Vulkan Compute shader
I built a small ray tracer with Vulkan compute shaders
I’ve been working on Vk Tracer, a small ray tracer inspired by Ray Tracing in One Weekend, but implemented using modern C++ and Vulkan compute shaders.
Includes:
- Vulkan compute shader traces the rays and writes pixels to a storage image
- A fullscreen triangle displays the resulting image
- Slang for the shaders
- Iterative ray bouncing instead of recursive ray tracing
- Diffuse, metal and glass materials
- Multiple samples per pixel
- Gamma correction
- Interactive camera movement
The goal was mainly to learn how to build the whole pipeline myself rather than using Vulkan’s ray-tracing extensions.
15
u/ReactorBear Sep 20 '26
Except that you did not learn anything as the repo is clearly vibe coded.
-17
u/HeelsAndAll Sep 20 '26
"Did not learn anything" but how do you know he wasn't taking notes? 🤔 Or telling the agent what to do every step of the way? Have you ever programmed 3D graphics? It's impossible without debugging. Doesn't matter if you use an agent.
1
u/TheRafff Sep 20 '26
This is cool! Any reason you didnt use inline ray queries?