I'm exploring using preprocessor directives in my shaders but I read that the #ifdef preprocessor directive only checks the defined token in the hlsl file, i.e. #define in the same file (or an included file).
So my question is, if I wanted to compile several versions of a shader with different tokens defined, how do I do that from c++?
Thanks in advance