Jump to content
  • Advertisement
Sign in to follow this  
Endemoniada

Getting .fx compilation warnings ?

This topic is 2611 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 guys,

What's the best way to get compilation warnings for my effects files ? In my game I'll be using D3DXCreateEffectFromFile() and I want to make sure my .fx files have no warnings (like truncation of vector, etc.) I tried looking at the passed ID3DXBuffer but it seems like it's not filled when there isn't an actual error.

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Don't compile the shader at runtime, use the FXC.exe utility in the DirectX SDK to create a precompilled shader file (.fxo) and read warnings and errors from it's output.

Share this post


Link to post
Share on other sites
Have you tried specifying the "treat warnings as errors" flag. I can't remember what it is called but I'm pretty sure it exists. That should give you an error if there's a warning and that would probably fill the error buffer.

Share this post


Link to post
Share on other sites

Have you tried specifying the "treat warnings as errors" flag. I can't remember what it is called but I'm pretty sure it exists. That should give you an error if there's a warning and that would probably fill the error buffer.


You could use NVIDIA FX Composer, just start a new FX file, hit compile, and it'll output errors and warning for you.

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!