<p>I've been implementing a path tracer in Vulkan using the VK_ray_tracing extension and am a bit confused on how to set up the pipeline. Currently I've been following the style of the Reference Path Tracer in Chapter 14 of Ray Tracing Gems II. Basically, having the raygen be an uber shader that does all of the iterative ray bounces and material calculations.</p>
<p>I've also heard of using a wavefront ray tracing approach for handling the different shader stages in hopes of getting better utilization.</p>
<p>In terms of implementing a path tracer, which approach is better from a performance perspective? Does the setup of VK_ray_tracing with hardware ray tracing invalidate the need for manually formulating the pathtracing in a wavefront manner or could it still benefit from that setup over a &quot;naive&quot; uber shader approach.</p>

CC BY-SA 4.0
2024-02-14T23:05:55.017Z
My path tracer, based on Sascha Willems' raytracingreflections demo, is at: https://github.com/sjhalayka/bidirectional_path_tracer
shawn_halayka
CC BY-SA 4.0
2024-02-15T17:27:55.873Z
So I see you've also done it in the Uber shader style
sshashank124
CC BY-SA 4.0
2024-02-15T17:30:59.110Z
Yes sir/ma'am, yes. I have one raygen shader. In any case, the pipeline code is there for the taking.
shawn_halayka
<raytracing><pathtracing><vulkan><performance>
Vulkan (Hardware) Path Tracing Formulation
sshashank124
# Vulkan (Hardware) Path Tracing Formulation

(Asked by: username_0 on 2024-02-14)

I've been implementing a path tracer in Vulkan using the VK\_ray\_tracing extension and am a bit confused on how to set up the pipeline. Currently I've been following the style of the Reference Path Tracer in Chapter 14 of Ray Tracing Gems II. Basically, having the raygen be an uber shader that does all of the iterative ray bounces and material calculations.

I've also heard of using a wavefront ray tracing approach for handling the different shader stages in hopes of getting better utilization.

In terms of implementing a path tracer, which approach is better from a performance perspective? Does the setup of VK\_ray\_tracing with hardware ray tracing invalidate the need for manually formulating the pathtracing in a wavefront manner or could it still benefit from that setup over a "naive" uber shader approach.

**Tags:** raytracing, pathtracing, vulkan, performance

> **Comments:**
> **username_1**: My path tracer, based on Sascha Willems' raytracingreflections demo, is at: https://github.com/sjhalayka/bidirectional_path_tracer  
> **username_0**: So I see you've also done it in the Uber shader style  
> **username_1**: Yes sir/ma'am, yes. I have one raygen shader. In any case, the pipeline code is there for the taking.  

---

## 0 answers

