Shader flickering, becomes unlit


I made a very simple shader for a mobile game, it’s a vertex lit with a color (no texture)
sometimes it renders corerctly and sometimes it appears unlit. looks like it depends on the distance but not only that.
here is the code :

Shader "Mobile/VertexLitColor"
		_Color("Main Color", COLOR) = (1,1,1,1)
		Tags{ "RenderType" = "Opaque" }
		LOD 100

		#pragma vertex vert
		#pragma fragment frag
		#include "UnityCG.cginc"
		#include "UnityLightingCommon.cginc"
	struct v2f
		fixed4 diff : COLOR0;
		float4 vertex : SV_POSITION;

	v2f vert(appdata_base v)
		v2f o;
		o.vertex = UnityObjectToClipPos(v.vertex);
		half3 worldNormal = UnityObjectToWorldNormal(v.normal);
		half nl = max(0, dot(worldNormal,;
		o.diff = nl * _LightColor0 * 1.5f;
		o.diff.rgb += unity_AmbientSky * 1.5f;
		o.diff.rgb *= 0.5f;
		return o;

	float4 _Color;

	fixed4 frag(v2f i) : SV_Target
		fixed4 col = _Color * i.diff;
		return col;

Any idea why it would do that and how to fix it ?

So I’ve had this bug for 2 days but it just fixed itself right now, I have no idea what fixed it so if you were hoping for an answer I’m sorry