hi all,I am freshman in unity shader,I need your help! I don’t know how get Grammar Tips when coding in mono.And where can find the detial reference about the function in CGINCLUDE v2f like this:
TransformViewToProjection(norm.xy);//how can i find this function reference?
Theres a useful file for syntax highlighting (only the shaderlab stuff, no cg) in notepad++ somewhere here on the forums. Don’t have a link but maybe you can find it. I don’t know of any good editor that gives you highlighting and code completion either.
As meh11 already said, take a look at the UnityCG.cginc (you’ll rarely find any comments though). Sometimes the lighting stuff helps as well (but not often). Another usefull thing is the cg documentation http://http.developer.nvidia.com/Cg/index.html Esepcially the stdlib docu, as it contains a description of the most used functions.
As some extra info for anyone else who stumbles on this (pretty old) thread, I’ve started documenting the UnityCG.cginc file along with a few other Unity cginc files and provided links to NVIDIA Cg site etc in the PDF at the bottom of this blog: https://www.lokeldigital.com/blog/researching-shaders-in-unity-v-01/
Over time I’ll be continuing this review into cginc files and documenting them.