I'm trying to figure out how to debug pixel and vertex shaders in DirectX, I've tried using Pix for Windows but find it to be quite buggy and effectively non-operational. Is there an alternative that would allow me to debug these shaders inside my own application?
4 Answers
I don't know of any third party tool for debugging hlsl-shaders, but I had good experiences with debugging it by using some simple techniques.
You could just copy render targets on cpu and store it into a bitmap, print it out to the terminal, or access it in your CPU debugger.
If there is a bug, you should first check whether the buffers you use really have the right values, at the beginning it can happen often that some textures are created with wrong parameters or the data is expected in another order ... in my experience this is a common error-source.