Skip to content

Commit ea06956

Browse files
committed
Adjust heading levels to match rest of tutorial
1 parent 69b555f commit ea06956

File tree

8 files changed

+32
-32
lines changed

8 files changed

+32
-32
lines changed

en/courses/18_Ray_tracing/00_Overview.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
== SIGGRAPH 2025: Hands-on Vulkan Ray Tracing with Dynamic Rendering
1+
= SIGGRAPH 2025: Hands-on Vulkan Ray Tracing with Dynamic Rendering
22

3-
=== Overview
3+
== Overview
44

55
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.
66

@@ -41,7 +41,7 @@ At the top of the C++ file, note the following variable:
4141

4242
At certain intervals, you will be instructed to update this variable and re-build to verify the effect of key changes, no need to write new code.
4343

44-
=== Chapters in this series
44+
== Chapters in this series
4545

4646
- xref:./00_Overview.adoc[Overview]
4747
- xref:./01_Dynamic_rendering.adoc[Dynamic rendering]
@@ -52,7 +52,7 @@ At certain intervals, you will be instructed to update this variable and re-buil
5252
- xref:./06_Reflections.adoc[Reflections]
5353
- xref:./07_Conclusion.adoc[Conclusion]
5454

55-
=== Build and run
55+
== Build and run
5656

5757
You can build and run the provided sample either from Visual Studio (set 38_ray_tracing as the start-up project) or via command line:
5858

@@ -63,5 +63,5 @@ cmake --build build --target 38_ray_tracing --parallel; start .\build\38_ray_tra
6363

6464
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.
6565

66-
=== Navigation
66+
== Navigation
6767
- Next: xref:./01_Dynamic_rendering.adoc[Dynamic rendering]

en/courses/18_Ray_tracing/01_Dynamic_rendering.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
== Dynamic Rendering
1+
= Dynamic Rendering
22

33
*Objective*: Ensure the base project uses *dynamic rendering* and understand how to verify it using RenderDoc.
44

55
In dynamic rendering, we no longer create a VkRenderPass or VkFrameBuffer; instead we begin rendering with `vkCmdBeginRenderingKHR`, specifying attachments on-the-fly. This makes our code more flexible (no need to predeclare subpasses) and is now the "modern" way to render in Vulkan.
66

7-
=== Task 1: Check the setup for dynamic rendering
7+
== Task 1: Check the setup for dynamic rendering
88

99
In the provided code base, locate the initialization of the graphics pipeline:
1010

@@ -83,7 +83,7 @@ commandBuffers[currentFrame].beginRendering(renderingInfo);
8383

8484
For more context, refer to the previous tutorial link:../../03_Drawing_a_triangle/02_Graphics_pipeline_basics/03_Render_passes.adoc[chapter].
8585

86-
==== Dynamic rendering with RenderDoc
86+
=== Dynamic rendering with RenderDoc
8787

8888
Use RenderDoc to launch the application and capture a frame:
8989

@@ -109,6 +109,6 @@ NOTE: Dynamic rendering reduces CPU overhead and, with the `VK_KHR_dynamic_rende
109109

110110
After this step, you should be comfortable that dynamic rendering is set up correctly. We can now move on to ray tracing features.
111111

112-
=== Navigation
112+
== Navigation
113113
- Previous: xref:./00_Overview.adoc[Overview]
114114
- Next: xref:./02_Acceleration_structures.adoc[Acceleration structures]

en/courses/18_Ray_tracing/02_Acceleration_structures.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
== Acceleration Structures (BLAS/TLAS)
1+
= Acceleration Structures (BLAS/TLAS)
22

33
*Objective*: Create *Bottom-Level Acceleration Structures* (BLAS) for the model's geometry, and a *Top-Level Acceleration Structure* (TLAS) to instance those BLASes.
44
Bind the TLAS to the shader so we can use Ray Queries.
@@ -17,7 +17,7 @@ We'll create one BLAS per distinct mesh/material and one TLAS that references th
1717
The ray query will use the TLAS.
1818
In Vulkan, building an AS involves a few steps: describe geometry, query build sizes, allocate buffers, create the AS handle, then issue a build command.
1919

20-
=== Task 2: Create a BLAS for each submesh
20+
== Task 2: Create a BLAS for each submesh
2121

2222
Go to the definition of `createAccelerationStructures`. Here we will first create the BLASes for each submesh in the model. The code already has a loop iterating over `submeshes`, which contains the geometry data.
2323

@@ -125,7 +125,7 @@ image::../../../images/38_TASK02_blas_build.png[]
125125

126126
Now you have a BLAS for each model in the scene. Next we need to put them all together into a single TLAS which will then be consumed by our fragment shader.
127127

128-
=== Task 3: Create a TLAS with instances of the BLASes
128+
== Task 3: Create a TLAS with instances of the BLASes
129129

130130
Now that we have the BLASes, we need to create a TLAS that references them. The TLAS will hold instances of the BLASes, allowing us to place them in the scene with transformations (position, rotation, scale).
131131

@@ -239,7 +239,7 @@ endSingleTimeCommands(*cmd);
239239

240240
Done! You have now created a TLAS that references all the BLASes for the submeshes in the model. The TLAS is ready to be used in ray queries in the fragment shader.
241241

242-
=== Task 4: Bind the acceleration structure to the shader
242+
== Task 4: Bind the acceleration structure to the shader
243243

244244
To make the acceleration structure available in the shader, we need to add a descriptor set binding for the TLAS. This is done in the `createDescriptorSetLayout()` function (you may ignore the higher bindings for now):
245245

@@ -301,6 +301,6 @@ Re-build and run using:
301301

302302
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.
303303

304-
=== Navigation
304+
== Navigation
305305
- Previous: xref:./01_Dynamic_rendering.adoc[Dynamic rendering]
306306
- Next: xref:./03_Ray_query_shadows.adoc[Ray query shadows]

en/courses/18_Ray_tracing/03_Ray_query_shadows.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
== Ray Query Shadows (Opaque Geometry)
1+
= Ray Query Shadows (Opaque Geometry)
22

33
*Objective*: Add a simple shadow test in the fragment shader using a ray query. We will cast a ray from each fragment point toward the light and darken the fragment if something is hit (hard shadow).
44

55
Congratulations: you have a valid TLAS/BLAS for the scene! Now, let's use it to cast some rays.
66

7-
=== Task 5: Implement ray query shadows
7+
== Task 5: Implement ray query shadows
88

99
In the fragment shader, we will use a ray query to cast a shadow ray from the fragment position towards the light source. If the ray hits any geometry before reaching the light, we will darken the fragment color:
1010

@@ -102,6 +102,6 @@ image::../../../images/38_TASK06_shadows_static.gif[]
102102

103103
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.
104104

105-
=== Navigation
105+
== Navigation
106106
- Previous: xref:./02_Acceleration_structures.adoc[Acceleration structures]
107107
- Next: xref:./04_TLAS_animation.adoc[TLAS animation]

en/courses/18_Ray_tracing/04_TLAS_animation.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
== TLAS Animation
1+
= TLAS Animation
22

33
*Objective*: Ensure shadows update when the object animates by rebuilding the TLAS with updated instance transforms each frame.
44

55
To account for the object's animation, we need to update the TLAS whenever the object moves or changes.
66
This involves updating the instance transforms and rebuilding the TLAS.
77
We will do this in the `updateTopLevelAS()` function, which is called every frame with the current model matrix.
88

9-
=== Task 6: Update the TLAS for animations
9+
== Task 6: Update the TLAS for animations
1010

1111
First we need to update the instance transforms with the current model matrix. This is done by iterating over the `instances` vector and setting the transform for each instance, then update the instances buffer.
1212

@@ -277,6 +277,6 @@ float4 fragMain(VSOutput vertIn) : SV_TARGET {
277277

278278
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.
279279

280-
=== Navigation
280+
== Navigation
281281
- Previous: xref:./03_Ray_query_shadows.adoc[Ray query shadows]
282282
- Next: xref:./05_Shadow_transparency.adoc[Shadow transparency]

en/courses/18_Ray_tracing/05_Shadow_transparency.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
== Implementing Transparency in Shadows
1+
= Implementing Transparency in Shadows
22

33
*Objective*: Add support for transparent objects in the scene. We will implement a simple alpha test to discard fragments with low alpha values, and replicate this in their corresponding ray traced shadows.
44

55
So far we have treated every geometry as opaque. Note however that the leaves are rendered with a texture that uses the alpha channel to define transparency, and currently that is not taken into account, so that we have some dark pixels around the edges of the leaves:
66

77
image::../../../images/38_TASK08_alphacut_before.png[]
88

9-
=== Task 7: Alpha-cut transparency
9+
== Task 7: Alpha-cut transparency
1010

1111
To implement alpha-cut transparency, we will discard fragments with low alpha values in the fragment shader. This is a common technique to handle transparent textures without needing complex blending or sorting:
1212

@@ -43,7 +43,7 @@ You will see that the shadows for the leaves are now completely missing! This is
4343

4444
Before we do that, let's first inspect the acceleration structures we have built so far, to understand how they are structured and what information is available for each triangle.
4545

46-
=== Task 8: Inspect the acceleration structures with NVIDIA Nsight Graphics
46+
== Task 8: Inspect the acceleration structures with NVIDIA Nsight Graphics
4747

4848
RenderDoc does not yet support inspecting Vulkan acceleration structures, but we can use *Nsight Graphics* to verify that our BLAS/TLAS are built correctly. This helps catch mistakes (e.g. wrong geometry counts, offsets) before we rely on them in shaders.
4949

@@ -79,7 +79,7 @@ In the new window, you can see the TLAS and its instances:
7979

8080
image::../../../images/38_TASK04_nsight_inspector.png[]
8181

82-
=== Task 9: Bindless resources and instance look-up table
82+
== Task 9: Bindless resources and instance look-up table
8383

8484
Until now, we did not need to know what triangle our ray intersected, we only cared about whether it hit something or not. But to implement transparency, we need to know the alpha value of the texture used to shade the point on the triangle we hit. This way we can determine if we hit a transparent pixel and we need to continue the traversal, in case we hit some other opaque triangle behind it on the way towards the light.
8585

@@ -169,7 +169,7 @@ StructuredBuffer<InstanceLUT> instanceLUTBuffer;
169169

170170
Now we will see how we can use these resources with ray query to handle transparent intersections.
171171

172-
=== Task 10: Ray query with alpha test
172+
== Task 10: Ray query with alpha test
173173

174174
Remember how `Proceed()` advances the state of the `RayQuery` object to the next intersection candidate along the ray? This is where we will implement our alpha test logic. We will check the alpha value of the texture used for shading the triangle we hit, and if it is below a certain threshold, we will continue the traversal to find the next opaque triangle. Once we find it, we 'commit' it, and the traversal will end.
175175

@@ -278,7 +278,7 @@ image::../../../images/38_TASK10_alphacut_shadows.png[]
278278

279279
With everything set in place to support transparency in shadows, implementing other effects like reflections is very straightforward!
280280

281-
=== Navigation
281+
== Navigation
282282
- Previous: xref:./04_TLAS_animation.adoc[TLAS animation]
283283
- Next: xref:./06_Reflections.adoc[Reflections]
284284

en/courses/18_Ray_tracing/06_Reflections.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
== Ray Query Reflections
1+
= Ray Query Reflections
22

33
*Objective*: We will cast a ray in the mirror-reflection direction from the fragment to see what it hits, simulating reflective materials (like a mirror or shiny surface).
44

55
Reflections are implemented similarly to shadow rays, but we cast a ray from the shaded point along the mirror direction and sample the hit surface color.
66

7-
=== Task 11: Implement ray query reflections
7+
== Task 11: Implement ray query reflections
88

99
First, we will use push constants to pass the reflective material flag to the fragment shader. This will allow us to determine if the current material is reflective or not.
1010

@@ -158,6 +158,6 @@ With all this in place, you should now see some shiny reflections on the table:
158158
image::../../../images/38_TASK11_alphacut_reflections.png[]
159159

160160

161-
=== Navigation
161+
== Navigation
162162
- Previous: xref:./05_Shadow_transparency.adoc[Shadow transparency]
163163
- Next: xref:./07_Conclusion.adoc[Conclusion]

en/courses/18_Ray_tracing/07_Conclusion.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
== Conclusion
1+
= Conclusion
22

33
In this course, you've implemented ray traced effects into a Vulkan rasterization pipeline using dynamic rendering and ray queries. Let's summarize the key points:
44

@@ -12,7 +12,7 @@ In this course, you've implemented ray traced effects into a Vulkan rasterizatio
1212
1313
We hope this lab gave you a hands-on taste of hybrid rendering with Vulkan's latest features. Happy rendering with Vulkan, and enjoy creating more advanced ray traced effects in your applications!
1414

15-
=== References
15+
== References
1616

1717
- Complete the full Vulkan Tutorial at https://github.com/KhronosGroup/Vulkan-Tutorial
1818
- Find more Vulkan documentation and resources at https://www.khronos.org/vulkan
@@ -27,5 +27,5 @@ The 3D assets were provided by Poly Haven and combined using Blender:
2727
- https://polyhaven.com/a/potted_plant_02
2828
- https://polyhaven.com/a/wooden_picnic_table
2929

30-
=== Navigation
30+
== Navigation
3131
- Previous: xref:./06_Reflections.adoc[Reflections]

0 commit comments

Comments
 (0)