Compiling Shaders

Using glslangValidator

glslangValidator input.vert -V -o output.spv produces a SPIR-V binary output.spv from the shader input.vert.

Note: type of shader is deduced from the file extension, therefore you must name vertex shaders with the file extension .vert or specify the stage to -S <stage>. See glslangValidator -h.

The #include directive

Add #extension GL_GOOGLE_include_directive : require before using the #include directive. You can also use disable, enable or warn with the #extension-directive