Skip to content

Commit f80c65d

Browse files
committed
Update README.md
1 parent adb6b42 commit f80c65d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# MSBuild-Target for Vulkan GLSL Shaders
1+
# MSBuild-Target for Vulkan GLSL&HLSL Shaders
22
Thanks to this (http://reedbeta.com/blog/custom-toolchain-with-msbuild/#example-project) article I was able to put a simple buildtarget for Visual Studio and MSBuild together.
33

4-
You can just add *.frag and *.vert files to your project.
5-
And set your projects Build Dependency to use VulkanGLSLShaderCompiler.targets, now *.frag and *.vert files are automatically recognized by Visual Studio as VulkanGLSLShader Files and will use the new target.
4+
# USAGE GLSL & HLSL
5+
Automatic extension recognized for GLSL like shown, for HLSL add .hlsl at the end and need to go to properties and select the Vulkan HLSL Compiler.
6+
And make sure to set a shader_stage via ```#pragma shader_stage(<stage>)``` replace <stage> with a shader stage.
7+
More infos on what stages to select and extensions: https://github.com/google/shaderc/tree/main/glslc#311-shader-stage-specification
8+
9+
You can just add shader files with the corrisponding extensions and set it up like described above.
10+
And set your projects Build Dependency to use VulkanGLSLShaderCompiler.targets, now GLSL files are automatically recognized by Visual Studio as Vulkan GLSL Shader Files, for HLSL please change from the autoselected ```HLSL shader``` Item Type to the ```Vulkan HLSL Shader``` type and it will use the new target.
611

712
All compiled shader get the .spv extension and are placed in the same output directory as your binary files in the "shader" directory. The output directory can be changed in the .target file, look for the "BinShaderOutPath" parameter.

0 commit comments

Comments
 (0)