upgraded NShader to work with vs2013 and unity

hi there,

i didn’t know in which subforum to put this. shader/scripting?

well, you probably know about the syntax highlighting tool for visual studio, NShader.
it’s a great tool which supports custom colors etc, but it wasn’t updated a while and didn’t support .shader file extensions.

so i just grabbed the source and added the missing pieces. you can download it here.

1517768--86592--$nshader.png

note: only makes sense if you use cg. if anyone is interested i might look into shaderlab support :wink:

cheers

2 Likes

Thank you. Worked for me.

Yes add shaderlab support too.

Anyway it doesn’t Highlight my code inside VS2013…the addin looks like installed though ?
Here is a piece of the code of a sample shader named ColorizeMe.shader

if it doesn’t work. go to the folder where it is installed.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\some random numbers
now copy the downloaded files into that folder.

now go to regedit and search for
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
and delete it.

start up vs.

tnx kris rok.

1 Like

Thanks kris, it works.
I wish I could change the colors so they are suited better for the dark theme VS.
Shaderlab support would be appreciated. :smile:

Thank you.

This is awesome. Thank you very much for your work!
But I assume it is not possible to customise the colours? This would be a key feature, as the colours used do not work well with the dark theme.

You can customize the colors. Go to Tools → Options → Fonts and Colors and look for “Shader Language…”.

I’ve forked the VS2013 build of NShader and added a couple of new features. More info and a download here!

3 Likes

I read your page, it is awesome!

1 Like