Please help to improve my shader

To all the shader magicians out there:

In my mobile game I am using vertex coloring to reduce draw calls. I don’t need specular color, but I would need shadows. This is the shader I wrote:

shader “Custom/SolidColorShader”
{
SubShader {
Tags { “RenderType” = “Opaque” }
CGPROGRAM
#pragma surface surf BlinnPhong vertex:vert

struct Input {
fixed3 vertColors;
};

void vert(inout appdata_full v, out Input o) {
o.vertColors = v.color.rgb;
}
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = IN.vertColors.rgb;
o.Specular = 0;
}
ENDCG
}
Fallback “Diffuse”
}

I am quite new to the topic of shaders. Is there a way to improve performance on this one?

Use Lambert instead of BlinnPhong. Also you don’t need a custom vert function to pass the vertex color, just the add “: COLOR” to the input variable. It’s a somewhat undocumented aspect of the surface shaders.

shader "Custom/SolidColorShader"
{
    SubShader {
        Tags { "RenderType" = "Opaque" }
        CGPROGRAM
        #pragma surface surf Lambert

        struct Input {
            fixed3 vertColors : COLOR;
        };

        void surf (Input IN, inout SurfaceOutput o) {
            o.Albedo = IN.vertColors.rgb;
        }
        ENDCG
    }
Fallback "Diffuse"
}