Today I decided to learn how to write shaders, so I started with this simple shader.
Shader "Unity Test/Diffuse" {
SubShader
{
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert
struct input
{
float4 color : COLOR;
};
void surf (Input IN, inout SurfaceOutput o)
{
o.Albedo = IN.color;
}
ENDCG
}
Fallback "Diffuse"
}
However, Unity tells me that there is a syntax error on line 14. I have not seen the reason why. Can anyone help?