Shader Shaker has been developed to solve our two main problems with shader development :
- The multiple languages our engine needs to support
- The combinational number of shader with the supported rendering technique
The architecture is simple :
- The HLSL files are converted to an AST using a ANTLR parser.
- The AST is then processed, cleaned and optimized.
- Finally, a writer generates code.
Premake is used as project generator. To build the project, follow those steps :
cd src/hlsl_parser # go to HLSL parser directory
./generate_parser.sh # generate the HLSL parser (use .bat file for Windows systems)
premake gmake # or any target you want to use ( vs2010, xcode4, ... )
You now have a valid project to build.