Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions en/courses/18_Ray_tracing/00_Overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Welcome! In this series, we enhance a Vulkan renderer with ray tracing features to implement real-time pixel-perfect shadows (with and without transparency) and a bonus reflection effect. You will work with provided scaffolded code (based on the Vulkan Tutorial) and fill in key shader functions following step-by-step instructions.

Slides available link:Vulkan%20Ray%20Tracing%20With%20Dynamic%20Rendering.pdf[here].
Slides available link:/attachments/Vulkan%20Ray%20Tracing%20With%20Dynamic%20Rendering.pdf[here].

By the end, you'll learn how to:

Expand All @@ -25,9 +25,9 @@ This series targets intermediate Vulkan programmers. We assume you have complete
*Provided Code*:
The provided code is a Vulkan renderer that already implements a basic graphics pipeline with dynamic rendering. It is based on the Vulkan Tutorial and it is self-contained in a single C++ source file and a Slang shader file:

- link:../../../attachments/38_ray_tracing.cpp[38_ray_tracing.cpp]
- link:../../../attachments/38_ray_tracing.slang[38_ray_tracing.slang]
- If you get stuck on shader tasks, you can refer to the provided reference solution: link:../../../attachments/38_ray_tracing_complete.slang[38_ray_tracing_complete.slang]
- link:/attachments/38_ray_tracing.cpp[38_ray_tracing.cpp]
- link:/attachments/38_ray_tracing.slang[38_ray_tracing.slang]
- If you get stuck on shader tasks, you can refer to the provided reference solution: link:/attachments/38_ray_tracing_complete.slang[38_ray_tracing_complete.slang]

The source code is structured to guide you through the steps, with hints and boilerplate provided. It also sets up all the required extensions and features, including `VK_KHR_acceleration_structure` and `VK_KHR_ray_query`.
You will find sections of code marked with `// TASKxx` which we reference in each chapter.
Expand All @@ -43,14 +43,14 @@ At certain intervals, you will be instructed to update this variable and re-buil

=== Chapters in this series

- link:00_Overview.adoc[Overview]
- link:01_Dynamic_rendering.adoc[Dynamic rendering]
- link:02_Acceleration_structures.adoc[Acceleration structures]
- link:03_Ray_query_shadows.adoc[Ray query shadows]
- link:04_TLAS_animation.adoc[TLAS animation]
- link:05_Shadow_transparency.adoc[Shadow transparency]
- link:06_Reflections.adoc[Reflections]
- link:07_Conclusion.adoc[Conclusion]
- xref:./00_Overview.adoc[Overview]
- xref:./01_Dynamic_rendering.adoc[Dynamic rendering]
- xref:./02_Acceleration_structures.adoc[Acceleration structures]
- xref:./03_Ray_query_shadows.adoc[Ray query shadows]
- xref:./04_TLAS_animation.adoc[TLAS animation]
- xref:./05_Shadow_transparency.adoc[Shadow transparency]
- xref:./06_Reflections.adoc[Reflections]
- xref:./07_Conclusion.adoc[Conclusion]

=== Build and run

Expand All @@ -64,4 +64,4 @@ cmake --build build --target 38_ray_tracing --parallel; start .\build\38_ray_tra
Note that the above hasn't changed from the base tutorial, and you may continue to build on other platforms as you have for the rest of the tutorial.

=== Navigation
- Next: link:01_Dynamic_rendering.adoc[Dynamic rendering]
- Next: xref:./01_Dynamic_rendering.adoc[Dynamic rendering]
4 changes: 2 additions & 2 deletions en/courses/18_Ray_tracing/01_Dynamic_rendering.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ NOTE: Dynamic rendering reduces CPU overhead and, with the `VK_KHR_dynamic_rende
After this step, you should be comfortable that dynamic rendering is set up correctly. We can now move on to ray tracing features.

=== Navigation
- Previous: link:00_Overview.adoc[Overview]
- Next: link:02_Acceleration_structures.adoc[Acceleration structures]
- Previous: xref:./00_Overview.adoc[Overview]
- Next: xref:./02_Acceleration_structures.adoc[Acceleration structures]
4 changes: 2 additions & 2 deletions en/courses/18_Ray_tracing/02_Acceleration_structures.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -302,5 +302,5 @@ Re-build and run using:
You will see no visual difference, but rest assured, your Acceleration Structures are now set up and ready to be used in the fragment shader.

=== Navigation
- Previous: link:01_Dynamic_rendering.adoc[Dynamic rendering]
- Next: link:03_Ray_query_shadows.adoc[Ray query shadows]
- Previous: xref:./01_Dynamic_rendering.adoc[Dynamic rendering]
- Next: xref:./03_Ray_query_shadows.adoc[Ray query shadows]
4 changes: 2 additions & 2 deletions en/courses/18_Ray_tracing/03_Ray_query_shadows.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ image::../../../images/38_TASK06_shadows_static.gif[]
The object is rotating, but the shadows are static. This is because we have not yet updated the TLAS to account for the object's animation. The TLAS needs to be rebuilt whenever the object moves or animates, so let's implement that next.

=== Navigation
- Previous: link:02_Acceleration_structures.adoc[Acceleration structures]
- Next: link:04_TLAS_animation.adoc[TLAS animation]
- Previous: xref:./02_Acceleration_structures.adoc[Acceleration structures]
- Next: xref:./04_TLAS_animation.adoc[TLAS animation]
4 changes: 2 additions & 2 deletions en/courses/18_Ray_tracing/04_TLAS_animation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,5 @@ float4 fragMain(VSOutput vertIn) : SV_TARGET {
NOTE: Ray Query vs Ray Tracing Pipeline: Notice how we added a ray tracing effect (shadows) directly in the fragment shader. We did not need a separate ray generation shader or any new pipeline. This is the power of ray queries (also known as inline ray tracing): we integrate ray traversal into our existing rendering pipeline. This keeps the shader logic unified and avoids extra GPU shader launches. On many mobile GPUs, this approach is not only more convenient but necessary: as mentioned, current mobile devices mostly support ray queries and not the full ray pipeline, and they run ray queries efficiently in fragment shaders. This is a key reason we focus on ray queries in this lab.

=== Navigation
- Previous: link:03_Ray_query_shadows.adoc[Ray query shadows]
- Next: link:05_Shadow_transparency.adoc[Shadow transparency]
- Previous: xref:./03_Ray_query_shadows.adoc[Ray query shadows]
- Next: xref:./05_Shadow_transparency.adoc[Shadow transparency]
4 changes: 2 additions & 2 deletions en/courses/18_Ray_tracing/05_Shadow_transparency.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ image::../../../images/38_TASK10_alphacut_shadows.png[]
With everything set in place to support transparency in shadows, implementing other effects like reflections is very straightforward!

=== Navigation
- Previous: link:04_TLAS_animation.adoc[TLAS animation]
- Next: link:06_Reflections.adoc[Reflections]
- Previous: xref:./04_TLAS_animation.adoc[TLAS animation]
- Next: xref:./06_Reflections.adoc[Reflections]


4 changes: 2 additions & 2 deletions en/courses/18_Ray_tracing/06_Reflections.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ image::../../../images/38_TASK11_alphacut_reflections.png[]


=== Navigation
- Previous: link:05_Shadow_transparency.adoc[Shadow transparency]
- Next: link:07_Conclusion.adoc[Conclusion]
- Previous: xref:./05_Shadow_transparency.adoc[Shadow transparency]
- Next: xref:./07_Conclusion.adoc[Conclusion]
2 changes: 1 addition & 1 deletion en/courses/18_Ray_tracing/07_Conclusion.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ The 3D assets were provided by Poly Haven and combined using Blender:
- https://polyhaven.com/a/wooden_picnic_table

=== Navigation
- Previous: link:06_Reflections.adoc[Reflections]
- Previous: xref:./06_Reflections.adoc[Reflections]
Loading