How/where do I write my shaders?

This is one thing that doesn’t seem clear in the unity documentation (or perhaps I haven’t found it). Do I just write it in VS2017? That isn’t working…

What’s not working?

Writing it in VS 2017. It keeps inserting semi-colons, no idea if that’s supposed to happen but it doesn’t compile. I created a Pass thingy and it even syntax suggested it but for some reason the compiler says “Pass” is an unresolved identifier (doesn’t know what it is) oddly enough.

You can use any code editor or text editor to write your shader code. But by default Visual Studio doesn’t do much syntax highlightning or suggestions for shader code (might exist plugins that solves this to some degree).

I would suggest you start by looking at simple shaders and just copy them and change things instead of trying to write one from scratch.

No idea why it would insert semicolons automatically though.

1 Like