Compiler for shader snippets and templates