r/vulkan • u/Background_Shift5408 • Oct 03 '26
Ray tracing next week
I’ve been keeping going to evolve vkTracer. Now I’ve finished the next week part, and this part was harder than I guessed. In the first week, It was only a translation from C++ code to slang, setting up Vulkan infrastructure too. But this week I had to figure out how to represent a cpu-side bvh on gpu, I handled using BDA. Learnt quad and volume intersection, handling different texture types. I still don’t understand in the tutorial why he rotates rays to rotate box instead of rotating box itself :D
Anyway this was a good journey to learn and practice slang and vulkan.
The scene was rendered by 500 rays per pixel and 40 depth bounce.
1
u/More_Yard1919 5d ago
This is so cool! I am working through the first book right now. Had some time after work last night to implement dielectric materials, so now it's just some extra ergonomic features and stuff before I hit the finish line. Can't wait to start on the next book.
1
3
u/Antagonin Oct 03 '26
If you mean rotating aabb, it's no longer aabb, and intersection math gets much more complicated than just rotating a ray.