Home

Awesome

HLSLcc

DirectX shader bytecode cross compiler.

Originally based on https://github.com/James-Jones/HLSLCrossCompiler.

This library takes DirectX bytecode as input, and translates it into the following languages:

This library is used to generate all shaders in Unity for OpenGL, OpenGL ES 3.0+, Metal and Vulkan.

Changes from original HLSLCrossCompiler:

Note

This project is originally integrated into the Unity build systems. However, building this library should be fairly straightforward: just compile src/*.cpp (in C++11 mode!) and src/cbstring/*.c with the following include paths:

Alternatively, a CMakeLists.txt is provided to build the project using cmake.

The main entry point is TranslateHLSLFromMem() function in HLSLcc.cpp (taking DX bytecode as input).

Contributors

License

MIT license for HLSLcc itself, BSD license for the bstring library. See license.txt.