Sign in to follow this  

Getting .fx compilation warnings ?

This topic is 2393 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
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
[quote name='pekarn' timestamp='1306619917' post='4816937']
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.
[/quote]

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

This topic is 2393 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.

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