Jump to content
  • Advertisement
Sign in to follow this  
Quat

Preprocessor and Effects11

This topic is 2561 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!