A reference compiler front end for GLSL and ESSL, partial HLSL support, and a SPIR-V generator.
Glslang is the Khronos Group's official reference front-end compiler for GLSL and ESSL shader languages. It validates shader code against the OpenGL and OpenGL ES specifications, translates it into an abstract syntax tree, and can generate SPIR-V bytecode for use with Vulkan and other APIs. It solves the problem of ensuring shader correctness and portability across different graphics platforms.
Graphics and game engine developers working with OpenGL, OpenGL ES, or Vulkan who need to compile, validate, and translate shaders. It is also used by toolchain developers integrating shader compilation into their pipelines.
Developers choose Glslang because it is the Khronos-sanctioned reference implementation, guaranteeing specification compliance. Its ability to generate SPIR-V from GLSL/ESSL and its partial HLSL support make it a versatile tool for cross-API shader development.
Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As the Khronos-sanctioned front-end, glslang provides specification-conformant validation for GLSL and ESSL, with results carrying similar weight as the specifications, ensuring shader correctness.
It reliably translates GLSL/ESSL to SPIR-V for Vulkan, with virtually complete support for the intermediate language, making it essential for Vulkan pipeline development.
Offers reflection directly from the AST, extracting types and variables for pipeline setup, though it's approximate for SPIR-V output as noted in the README.
Provides both C++ class-based and C functional APIs, along with a standalone CLI tool, facilitating integration into various projects, as demonstrated in the code examples.
HLSL front-end is only partially complete with non-reference semantics and no validation, making it unreliable for serious HLSL work, as openly admitted in the README.
Requires dependencies like CMake, Python, and bison, and involves multiple steps for setup, which can be cumbersome for quick integration, especially on non-standard platforms.
Reflection data is accurate for the AST but only approximate for emitted SPIR-V, limiting precision in some use cases, as stated in the project status.