Add SIGGRAPH2026 Vulkan tutorial#419
Conversation
| The repo includes a Visual Studio 2022 x64 preset: | ||
|
|
||
| ```bash | ||
| cmake --preset vs2022-debug -DSLANGC_EXECUTABLE="C:/VulkanSDK/1.4.341.1/Bin/slangc.exe" |
There was a problem hiding this comment.
Any reason there is a preset that's pinned to a specific VS version? I'm already on VS2026.
SaschaWillems
left a comment
There was a problem hiding this comment.
Shader compilation fails for me with the following error:
Custom build for 'V:\Vulkan-Docs-Site\Vulkan-Tutorial-review\attachments\siggraph2026_vk_tutorial\build\vs2022\CMakeFiles\d79c7eb460355f97f6a43dc990eed41f\albedo.frag.spv.rule;V:\Vulkan-Docs-Site\Vulkan-Tutorial-review\attachments\siggraph2026_vk_tutorial\build\vs2022\CMakeFiles\f53c6c7b794bd22104e72c02a70f4a94\albedo_fragment_shader.rule;V:\Vulkan-Docs-Site\Vulkan-Tutorial-review\attachments\siggraph2026_vk_tutorial\CMakeLists.txt' exited with code 3.
I have the SDK installed, slangc is in the path, and CMake slang compiler variable properly points at it.
| See the [course page](https://github.com/KhronosGroup/Vulkan-Tutorial/blob/main/en/courses/siggraph2026_vk_tutorial) for more information. | ||
|
|
||
| > [!NOTE] | ||
| > ChatGPT and Codex were used to generate code for this tutorial. |
There was a problem hiding this comment.
Pretty sure this will upset at least some people. It might feel odd that the people creating the api (we as Khronos) use AI to generate code :/
| After cloning the repository, initialize the pinned dependencies with: | ||
|
|
||
| ```bash | ||
| python .\init_submodules.py |
There was a problem hiding this comment.
Why is this required? Shouldn't git submodules work fine here? If not, why not use CMake's FetchContent instead?
| attachments/template/build/** No newline at end of file | ||
| attachments/template/build/** | ||
|
|
||
| attachments/siggraph2026_vk_tutorial/.git/ |
There was a problem hiding this comment.
Why is the git folder excluded?
|
|
||
| // In Slang we can use HLSL annotations to communicate attributes between vertex and fragment shaders. | ||
| struct FragmentInput { | ||
| float3 worldPosition : TEXCOORD2; |
There was a problem hiding this comment.
There's no need for out-dated HLSL semantics in Slang
| } | ||
|
|
||
| [shader("fragment")] | ||
| float4 fragmentMain(FragmentInput input) : SV_Target |
There was a problem hiding this comment.
Same here, no HLSL semantics are required, esp. not if you only have one output
| // [VK_SHADER_STAGE_FRAGMENT_BIT]. This is not invalid, but the write to the unused Output is discarded, causing a | ||
| // performance validation message. Proper solution is to have a custom vertex shader, but this is intentionally | ||
| // avoided to keep the tutorial simple. | ||
| if (color.a < 0.0f) { |
There was a problem hiding this comment.
What's this supposed to do? The comment above doesn't refer to the actual code.
| @@ -0,0 +1,9 @@ | |||
| MIT License | |||
There was a problem hiding this comment.
Any reason the license file is duplicated (see src/LICENSE)?
| # SIGGRAPH 2026: How to write a Vulkan application | ||
|
|
||
| This is a simple tutorial with the objective of explaining how to write a Vulkan application in 2026. | ||
| The tutorial employs the latest recommended best practices for beginners: |
There was a problem hiding this comment.
Tbh. I wouldn't say that descriptor heaps are a topic for beginners.
Code for the SIGGRAPH 2026 Vulkan Tutorial.