Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

#The hacky way of getting VS to provide syntax highlighting for Unity's compute shaders.

  1. Turn off Visual Studio

  2. In C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\VC

As administrator, remove the read-only flag on the file VC_Pkg_Core_Registration.pkgdef, and edit it in a evelated text editor.

  1. Search for .cginc, and for each cginc entry in the file, add a similar entry for .compute. Like this:


[$RootKey$\Languages\File Extensions\.compute]

[$RootKey$\Languages\File Extensions\.cginc]
  1. Open a Visual Studio 2015 Developer Prompt, and input devenv /updateconfiguration

  2. Open Visual Studio 2015, compute shaders will be colorized as HLSL in VS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment