Are Vulkan shaders written in the same way as in OpenGL or GLSL?

In OpenGL, the only choice for writing shaders is to use GLSL and pass the GLSL into the driver. In Vulkan, you can also write in GLSL and use an offline tool chain to translate that to SPIR-V (standard Vulkan only accepts SPIR-V).

There are plenty of other choices, and many people are likely to experiment with different languages and different kinds of tool chains, middleware, and game engines to generate the SPIR-V that goes into the driver. Some can be linked directly into an application, so you don’t have to rely solely on offline support. We call this off-driver support, and you can do it online by using a side tool in real-time. Note that it isn’t part of the core Vulkan drivers stack.

Return to FAQs