I’ve been reading through the Shader tutorials, but a couple of questions come to mind…
I’ve previously used Nvidia FX composer for writing shaders…
What should we use for Shaderlab language ? I didn’t see any reference to an editor or compiler tool ?
-
Do we just edit with any convenient text editor, and compile with unity ?
-
and I tried copying one of the existing unity shaders (Normal-BumpSpec.shader), as a starting place. just changed the file name, and the shader name in the file… but this throws an error (near the end of the file on a blank line) ?
Tried copying several different default shaders, (from builtin_shaders.zip) all with the same result… what am I missing please ?
Error:-
CGPROGRAM block does not contain #pragma vertex nor #pragma fragment directive, skipping
Unrecognized #pragma directive: surface
Syntax error in Normal-BumpSpec2: } at line 48
note:-line 48 is blank… is the last line before }
I’m using unity 2.6 and downloaded the builtin_shaders.zip on launch day of unity 3.0… could this be the problem ?
thx for any help.