A tool and library for parsing, reflecting on, and converting SPIR-V shaders to high-level languages like GLSL, HLSL, and MSL.
SPIRV-Cross is a tool and library for parsing and converting SPIR-V shader bytecode to other high-level shading languages like GLSL, HLSL, and MSL. It solves the problem of shader portability across different graphics APIs by providing a reliable way to translate and reflect on SPIR-V modules, enabling cross-platform graphics development.
Graphics engineers, game developers, and toolchain developers working with Vulkan, OpenGL, Metal, or DirectX who need to convert or inspect SPIR-V shaders across different platforms.
Developers choose SPIRV-Cross for its robust, production-ready conversion capabilities, comprehensive reflection API, and focus on emitting clean, human-readable output. It is maintained by the Khronos Group, ensuring alignment with industry standards and long-term stability.
SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Emits GLSL, MSL, and HLSL that looks hand-written rather than awkward IR code, prioritizing usability as stated in the project philosophy.
Provides detailed inspection of SPIR-V decorations, resources, and pipeline layouts, enabling automated shader analysis and modification for toolchain integration.
Converts SPIR-V to GLSL for OpenGL/Vulkan, MSL for Metal, HLSL for DirectX, and JSON for reflection, covering all major graphics platforms.
Offers a C89-compatible API that is ABI-stable for shared library use, ensuring long-term compatibility in C and foreign language bindings.
Certain obscure GLSL features may not be fully supported, as admitted in the README, requiring manual workarounds for edge-case shaders.
The primary C++ API is not ABI-stable, forcing static linking and risking breaking changes in updates, which complicates dynamic library usage.
Handling quirks like separable samplers, descriptor sets, and clip-space conversions adds integration overhead and requires careful configuration per target API.