3

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?

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
ares_games
  • 1,019
  • 2
  • 15
  • 32

1 Answers1

5

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 #region pragmas, I think that a macro, as explained in this answer on SO, will do the trick. Here is another example also.

Community
  • 1
  • 1
Yannick Blondeau
  • 9,465
  • 8
  • 52
  • 74