Verify HLSL file at compile time in Visual Studio

I am looking for an easy way to detect errors in an HLSL file while compiling a program from visual studio. I want to add a custom assembly to my shader files that compile them, and make sure that the assembly failed if I did something stupid, like a reference to an undefined variable or other things that would otherwise be detected when compiling the shader in the application.

Has anyone successfully configured this before?

+4
source share
2 answers

For everyone who comes, here's a useful (and more verbose) guide on how to do this in VS2010:

http://takinginitiative.net/2011/02/19/debugging-hlsl/

+2
source

Please note that VS2012 has an automatic compilation of shader files.

+3
source

All Articles