A cross-compiler for shader languages, converting between SPIR-V, GLSL, HLSL, and Metal Shader Language.
CrossShader is a cross-compiler for shader languages that enables developers to convert shader code between SPIR-V, GLSL, HLSL, and Metal Shader Language. It solves the problem of maintaining multiple shader versions for different graphics APIs and platforms by providing a unified transpilation tool.
Graphics programmers, game developers, and engine developers who need to target multiple rendering backends (e.g., Vulkan, DirectX, OpenGL, Metal) from a single shader codebase.
Developers choose CrossShader because it wraps several low-level compiler tools into a simple, consistent API, reducing the complexity of shader cross-compilation and saving time when porting graphics applications across platforms.
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Converts between SPIR-V, GLSL, HLSL, and Metal Shader Language by wrapping established compilers like DirectX Shader Compiler and glslang, eliminating the need to manage multiple tools separately.
Exposes a single `compile` function with simple configuration structs, abstracting the complexity of underlying compilers and making shader transpilation straightforward.
Available as both a Node.js module (using WebAssembly) and a C++ library, catering to web and native development environments, as shown in the installation examples.
Allows compiling to specific language versions, such as downgrading GLSL from 450 to 100 for older GPU compatibility, demonstrated in the usage code snippets.
Requires CMake and managing git submodules, which can be cumbersome and error-prone compared to simpler dependency management, as highlighted in the installation instructions.
Relies on tools like DirectX Shader Compiler and glslang, so bugs or updates in these compilers might not be immediately reflected, potentially causing compatibility issues.
The Node.js version depends on WebAssembly, which may not be supported in all environments and adds abstraction that could affect performance or portability.