MSVC Shader syntax highlighting
Tuesday, March 4, 2003 | Permalink
Two small files are included that enables syntax highlighting of vertex and pixel shaders in MSVC 6.0, not sure if it works for MSVC.NET. It supports these shader languages:
- GL_ARB_vertex_program
- GL_ARB_fragment_program
- OpenGL 2.0 glslang
- DX9 HLSL
To use it, just do these steps:
- Close MSVC if it's open.
- Copy usertype.dat to <MSVC_dir>\Common\MSDev98\Bin. If there's already a file there, don't overwrite it, just open it and paste the contents at the end of the file instead.
- Open regedit and go to HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++. If you use .vsh and .fsh for vertex and pixel shaders then add ";fsh;vsh" at the end of the "FileExtensions" entry. If you're lazy you may just double-click the coloring.reg files instead (will overwrite that key though and not just concatenate).
If you have included any shader files into a project already, MSVC will still think it's a normal text file. To solve that problem, just remove them from the project and include them again.