I'm creating an include file (.h) for Maya dx11
I don't know how to wrap toggles and keywords in #if instead of the usual if.

I write #define 〇〇 in the Shader file (.fx) and enclose it with #ifdef, but I can't find a substitute for #pragma shader_feature or #pragma multi_compile like Unity's Shader. .. Also, parameters and structs could not be enclosed in a simple if statement.

  • Answer # 1

    Was self resolved! Thank you