Simple diffuse shader using ShaderLab in Unity

// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

Shader "Custom/SimpleShader" {
	Properties {
		_AmbientLightColor("Ambient Light", Color) = (1,1,1,1)
		_AmbientLightIntensity("Ambient Light Intensity", Range(0.0,1.0)) = 1.0

		_DiffuseDirection("Diffuse Light Direction", Vector) = (0.2,0.8,0.7,1)
		_DiffuseColor("Diffuse Light Color", Color)=(1,1,1,1)
		_DiffuseIntensity("Diffuse Light Intensity", Range(0.0,1.0))=1.0
	}

	SubShader
	{
		Pass
		{
			CGPROGRAM

			#pragma vertex vertexShader
			#pragma fragment fragmentShader

			fixed4 _AmbientLightColor;
			float _AmbientLightIntensity;
			float3 _DiffuseDirection;
			float4 _DiffuseColor;
			float _DiffuseIntensity;

			struct VertexShaderInput{
				float4 position : POSITION;
				float3 normal : NORMAL;
			};

			struct VertexShaderOutput{
				float4 position : SV_POSITION;
				float3 normal : NORMAL;
			};

			//Input : VertexShaderInput
			//Output: VertexShaderOutput
			VertexShaderOutput vertexShader(VertexShaderInput vIn)
			{
				//The vertex position is multiplied
				//with the MVP matrices of Unity.
;				VertexShaderOutput vOut;
				vOut.position = UnityObjectToClipPos(vIn.position);
				vOut.normal = vIn.normal;

				return vOut;
			}

			//OUTPUT : A render target
			float4 fragmentShader(VertexShaderOutput vOut) : SV_Target
			{
				float diffuseFactor = saturate(dot(_DiffuseDirection, vOut.normal));
				return (_AmbientLightColor * _AmbientLightIntensity) +
						(diffuseFactor * _DiffuseColor *  _DiffuseIntensity);
			}

			ENDCG
		}
	}
}

Simple ShaderLab code for Flat color material


// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'</code>

Shader "Custom/SimpleShader" {
Properties {
  _AmbientLightColor("Ambient Light", Color) = (1,1,1,1)
  _AmbientLightIntensity("Ambient Light Intensity", Range(0.0,1.0)) = 1.0
}
SubShader
{
  Pass
  {
   CGPROGRAM

   #pragma vertex vertexShader
   #pragma fragment fragmentShader

   fixed4 _AmbientLightColor;
   float _AmbientLightIntensity;

   //Input : POSITION
   //Output: SV_POSITION
   float4 vertexShader(float4 v:POSITION) : SV_POSITION
   {
     //The vertex position is multiplied
     //with the MVP matrices of Unity.

     return UnityObjectToClipPos(v);
   }

   //OUTPUT : A render target
   fixed4 fragmentShader() : SV_Target
   {
     return _AmbientLightColor * _AmbientLightIntensity;
   }

   ENDCG
  }
 }
}