We’ll still support the Effect syntax. We’re already using our own parser to read and remove Effect syntax before feeding the shader to the DX compiler.
We’ll either drop support for legacy dx9 shader syntax or we’ll use our parser to rewrite DX9 code to DX10+ syntax. IMO we should drop dx9 support, but we have to discuss this. You can already write DX11 shaders, but we compile shaders with legacy flag so users don’t have to migrate shaders they used with XNA.
We’ll use HlslTools as the preprocessor, parser and syntax rewriter.
Thanks for pointing me at HLSLTools, not seen that before and it is pretty cool.
Please don’t underestimate the task of going from DX9 to DX11.
One of the massive problems I had to deal with is #includes. The DX9 shader compiler is very good at dead code optomisation, so if you have a whole bunch of uniforms and samplers in an included file, no problem. I found the metal shader compiler does dead code optomisation very late , which caused me all sorts of problems.
Also the online metal compiler is sandboxed, it has no access to the file system, so you cannot have #includes in metal shaders that are compiled online. You can if you pre-compile them, just not in game.