• Advertisement
Sign in to follow this  

Preprocessor and Effects11

This topic is 2410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using the Effects11 framework to generate different shader permutations. However, I still need to support different vertex structures based on flags, and the uniform effect parameters only work inside shader functions. I also precompile all my effects with FXC. Is it possible to pass preprocessor flags to FXC?

Share this post


Link to post
Share on other sites
Advertisement

I am using the Effects11 framework to generate different shader permutations. However, I still need to support different vertex structures based on flags, and the uniform effect parameters only work inside shader functions. I also precompile all my effects with FXC. Is it possible to pass preprocessor flags to FXC?

This ought to get you started :) Specifically, you'll want to look at the /D switch, which adds a preprocessor symbol definition just as if you had added it to the appropriate macro array in the D3DCompile function and friends. There's a few other useful flags, too.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement