Sign in to follow this  

HLSL preprocessor directives

Recommended Posts

I'm exploring using preprocessor directives in my shaders but I read that the #ifdef preprocessor directive only checks the defined token in the hlsl file, i.e. #define in the same file (or an included file).


So my question is, if I wanted to compile several versions of a shader with different tokens defined, how do I do that from c++?


Thanks in advance

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