The following toon shader makes a weird defect, like there is a second light in the scene.
Shader "Custom/Rim_Light" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_LightBright ("Bright", Range(0, 1)) = 0.7
_LightDark ("Dark", Range(0, 1)) = 0.3
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Custom
sampler2D _MainTex;
float _LightBright;
float _LightDark;
struct Input {
float2 uv_MainTex;
};
half4 LightingCustom (SurfaceOutput s, half3 LightDir, half atten) {
half NdotL = dot (s.Normal, LightDir);
half c;
if ((NdotL) > 0.7){
c = _LightBright;
}
else {
c = _LightDark;
}
return c;
}
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
Here is a picture
The only light in the scene is the one visible in the picture.