Jump to content
  • Advertisement
Sign in to follow this  
Hybrid666

Problems including shader files from other shader files in Cg?

This topic is 3564 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

Hi, I've just formatted my PC, and suddenly my shader files won't compile! I set the application's working directory in Visual Studio, then in my shaders, I include files relative to that directory, and it has always worked fine. The only thing I can think that's changed is I'm now running CG 2.1 whereas before I was running 2.0 If I use an absolute path in the shader file then it works. If I use the -I compiler argument with a relative path, it still doesn't work, but that may be because I have a space in my include directory, which another thread on here says doesn't work.. But it all used to work fine with relative paths and no -I command, so I'm very confused! :( Any ideas? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I had to find the current working directory (using GetCurrentDirectory) and pass that as an include directory to the Cg compiler (using -I).

Strange that I never used to need to do this for it to work.. :\

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!