Sign in to follow this  
Quat

Preprocessor and Effects11

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
[quote name='Quat' timestamp='1311012112' post='4836918']
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?
[/quote]
[url="http://msdn.microsoft.com/en-us/library/bb509709(v=vs.85).aspx"]This[/url] 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this