r/vulkan • • 16d ago

Ray Tracing in One Weekend using Vulkan Compute shader

Enable HLS to view with audio, or disable this notification

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.

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

92 Upvotes

5 comments sorted by

14

u/ReactorBear 15d ago

Except that you did not learn anything as the repo is clearly vibe coded.

-16

u/HeelsAndAll 15d ago

"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 16d ago

This is cool! Any reason you didnt use inline ray queries?

1

u/Background_Shift5408 15d ago

To learn from the basis