Skip to content

Commit 9db4d25

Browse files
committed
Update shader links and improve Slang shader references across all chapters
- Replace "Slang shader" references for consistent naming convention (`slang shader`). - Add GLSL shader links (Vertex, Fragment, and Compute where applicable) alongside `C++` code in all relevant chapters. - Correct usage of `slangc.exe` in shader compilation instructions.
1 parent e3e20c4 commit 9db4d25

23 files changed

+91
-25
lines changed

en/03_Drawing_a_triangle/02_Graphics_pipeline_basics/01_Shader_modules.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ Create a `compile.bat` file with the following contents:
281281

282282
[,bash]
283283
----
284-
C:/VulkanSDK/x.x.x.x/bin/slang.exe shader.slang -target spirv -profile spirv_1_4 -emit-spirv-directly -fvk-use-entrypoint-name -entry vertMain -entry fragMain -o slang.spv
284+
C:/VulkanSDK/x.x.x.x/bin/slangc.exe shader.slang -target spirv -profile spirv_1_4 -emit-spirv-directly -fvk-use-entrypoint-name -entry vertMain -entry fragMain -o slang.spv
285285
----
286286

287-
Replace the path to `slang.exe` with the path to where you installed
287+
Replace the path to `slangc.exe` with the path to where you installed
288288
the Vulkan SDK. Double-click the file to run it.
289289

290290
*Linux*
@@ -530,4 +530,7 @@ vk::PipelineShaderStageCreateInfo shaderStages[] = {vertShaderStageInfo, fragSha
530530
That's all there is describing the programmable stages of the pipeline.
531531
In the xref:./02_Fixed_functions.adoc[next chapter,] we'll look at the fixed-function stages.
532532

533-
link:/attachments/09_shader_modules.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
533+
link:/attachments/09_shader_modules.cpp[C{pp} code] /
534+
link:/attachments/09_shader_base.slang[Slang shader] /
535+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
536+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/02_Graphics_pipeline_basics/02_Fixed_functions.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,7 @@ This reduces the chance of running into unexpected behavior because the default
341341

342342
There is, however, one more object to create before we can finally create the graphics pipeline, and that is a xref:./03_Render_passes.adoc[render pass].
343343

344-
link:/attachments/10_fixed_functions.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
344+
link:/attachments/10_fixed_functions.cpp[C{pp} code] /
345+
link:/attachments/09_shader_base.slang[Slang shader] /
346+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
347+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/02_Graphics_pipeline_basics/03_Render_passes.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ The advantage of dynamic rendering is that it simplifies the rendering process b
3939

4040
In the xref:./04_Conclusion.adoc[next chapter], we'll put everything together to finally create the graphics pipeline object!
4141

42-
link:/attachments/12_graphics_pipeline_complete.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
42+
link:/attachments/12_graphics_pipeline_complete.cpp[C{pp} code] /
43+
link:/attachments/09_shader_base.slang[Slang shader] /
44+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
45+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/02_Graphics_pipeline_basics/04_Conclusion.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,7 @@ We are already getting quite close to seeing something pop up on the screen.
9191
In the xref:/03_Drawing_a_triangle/03_Drawing/00_Framebuffers.adoc[next couple of chapters,]
9292
we'll set up the actual framebuffers from the swap chain images and prepare the drawing commands.
9393

94-
link:/attachments/12_graphics_pipeline_complete.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
94+
link:/attachments/12_graphics_pipeline_complete.cpp[C{pp} code] /
95+
link:/attachments/09_shader_base.slang[Slang shader] /
96+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
97+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/03_Drawing/00_Framebuffers.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,7 @@ With this approach, we don't need to create framebuffers or render passes, which
8282

8383
In the xref:./01_Command_buffers.adoc[next chapter,] we'll create command buffers and write the first actual drawing commands using dynamic rendering.
8484

85-
link:/attachments/14_command_buffers.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
85+
link:/attachments/14_command_buffers.cpp[C{pp} code] /
86+
link:/attachments/09_shader_base.slang[Slang shader] /
87+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
88+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/03_Drawing/01_Command_buffers.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,4 +334,7 @@ commandBuffer.end();
334334

335335
In the xref:./02_Rendering_and_presentation.adoc[next chapter] we'll write the code for the main loop, which will acquire an image from the swap chain, record and execute a command buffer, then return the finished image to the swap chain.
336336

337-
link:/attachments/14_command_buffers.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
337+
link:/attachments/14_command_buffers.cpp[C{pp} code] /
338+
link:/attachments/09_shader_base.slang[Slang shader] /
339+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
340+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/03_Drawing/02_Rendering_and_presentation.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,4 +441,7 @@ barriers and further refine our understanding of synchronization in Vulkan.
441441

442442
The xref:./03_Frames_in_flight.adoc[next chapter] will expand the render loop to handle multiple frames in flight.
443443

444-
link:/attachments/15_hello_triangle.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
444+
link:/attachments/15_hello_triangle.cpp[C{pp} code] /
445+
link:/attachments/09_shader_base.slang[Slang shader] /
446+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
447+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/03_Drawing/03_Frames_in_flight.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,7 @@ To learn more about synchronization through examples, have a look at https://git
146146
In the xref:../03_Drawing_a_triangle/04_Swap_chain_recreation.adoc[next
147147
chapter] we'll deal with one more small thing required for a well-behaved Vulkan program.
148148

149-
link:/attachments/16_frames_in_flight.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
149+
link:/attachments/16_frames_in_flight.cpp[C{pp} code] /
150+
link:/attachments/09_shader_base.slang[Slang shader] /
151+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
152+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,7 @@ The initial call to `glfwGetFramebufferSize` handles the case where the size is
246246
Congratulations, you've now finished your very first well-behaved Vulkan program!
247247
In the xref:04_Vertex_buffers/00_Vertex_input_description.adoc[next chapter] we're going to get rid of the hardcoded vertices in the vertex shader and actually use a vertex buffer.
248248

249-
link:/attachments/17_swap_chain_recreation.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
249+
link:/attachments/17_swap_chain_recreation.cpp[C{pp} code] /
250+
link:/attachments/09_shader_base.slang[Slang shader] /
251+
link:/attachments/09_shader_base.vert[GLSL Vertex shader] /
252+
link:/attachments/09_shader_base.frag[GLSL Fragment shader]

en/04_Vertex_buffers/00_Vertex_input_description.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,7 @@ The pipeline is now ready to accept vertex data in the format of the `vertices`
181181
If you run the program now with validation layers enabled, you'll see that it complains that there is no vertex buffer bound to the binding.
182182
The xref:./01_Vertex_buffer_creation.adoc[next step] is to create a vertex buffer and move the vertex data to it so the GPU is able to access it.
183183

184-
link:/attachments/18_vertex_input.cpp[C{pp} code] / link:/attachments/18_shader_vertexbuffer.vert[Vertex shader] / link:/attachments/18_shader_vertexbuffer.frag[Fragment shader]
184+
link:/attachments/18_vertex_input.cpp[C{pp} code] /
185+
link:/attachments/18_shader_vertexbuffer.slang[slang shader] /
186+
link:/attachments/18_shader_vertexbuffer.vert[GLSL Vertex shader] /
187+
link:/attachments/18_shader_vertexbuffer.frag[GLSL Fragment shader]

0 commit comments

Comments
 (0)