Sign in to follow this  
Endemoniada

Getting .fx compilation warnings ?

Recommended Posts

Endemoniada    430
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
Dunge    405
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
pekarn    173
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
Kamo16    102
[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

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