仿Unity Shaderlab的Shader跨平台编译器。使用DirectX Shader Compiler以及GLSLang编译器作为前端,SPIRV-Cross作为后端,将HLSL以及GLSL编译成DXIL、SPIR-V、HLSL、Metal和GLSL。
内置一个ShaderCross可执行程序,可对*.shaderlab编译成对应平台的Shader并以Json的方式输出。
- Git:安装git,配置好环境。
- Visual Studio 2017:任意版本即可。
- CMake:越新越好,至少3.9。
- Python:任意版本,配置好环境。
- 打开CMakeGUI
Where is the source code选择Path/ShaderLabWhere is the build the binaries选择Path/ShaderLab/Build- 点击
Configure,选择Visual Studio 2017 x64 - 点击
Generate - 点击
Open Project
ShaderLab is a tool designed for cross-compiling unity shaderlab to other shading languages.
- Git
- Visual Studio 2017
- CMake
- Python
mkdir Build
cd Build
cmake -G "Visual Studio 15" ../MIT License