Here is a vertex colored shader im using.
My plan is using it for mobile devices.
But im not completely sure if its optimized enough?
Is there anything i can change to make it faster for mobiles?
Shader "Custom/Vertex Colored Diffuse"
{
SubShader {
Tags { "RenderType"="Opaque" }
CGPROGRAM
#pragma surface surf Lambert vertex:vert
struct Input {
float3 vertColor;
};
void vert (inout appdata_full v, out Input o) {
UNITY_INITIALIZE_OUTPUT(Input, o);
o.vertColor = v.color;
}
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = IN.vertColor;
}
ENDCG
}
Fallback "Diffuse"
}