First of all sorry if it is a stupid question, but I am very new to D3D and first round of googling didn't help much (maybe I did it with wrong keywords).
So I have a shader with a bunch of #define I want to set at load time and have different version of the shader depending on the value set this way. What is the best way to preprocess the shader source before compiling it into a shader? Looking at tutorials online all I can find is D3DCompileFromFile or variants like that. This apparently is not friendly to what I want to do.
Is there something like "D3DCompileFromString" ? Or anyway, what is the best way to do that?
Thank you!