Is there any way to get syntax highlighting (and maybe something like “Format Document”) for fx files in visual studio 2010 ? It is quite hard to debug more complex HLSL shader code without it. I know I could use fx composer but I would rather not switch between different dev-environments 🙂 Furthermore, I frequently use #region pragmas in VS2010. Is there something similar for editing HLSL shader code in VS2010?
Is there any way to get syntax highlighting (and maybe something like Format Document)
Share
You should have a look to the NShader project on CodePlex. It’s an extension for Visual Studio 2010 that does just that: adding syntax highlighting for various shading languages.
Regarding the
#regionpragmas, I think that a macro, as explained in this answer on SO, will do the trick. Here is another example also.