Please tell me why this shader is not valid. I get a syntax error pointing to line “#pragma surface surf Lambert”.
when i comment out that line the syntax error disappears but i don’t get the correct output.
You can find the original shader at Unity - Manual: Surface Shader examples
I only added a pass{} block.
Shader "Example/Diffuse Simple" {
SubShader
{
Tags { "RenderType" = "Opaque" }
pass
{
CGPROGRAM
#pragma surface surf Lambert
struct Input {
float4 color : COLOR;
};
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = 1;
}
ENDCG
}
}
Fallback "Diffuse"
}