- Home /
Question by
Radomyr · Aug 29, 2017 at 01:23 PM ·
unity 5toon shader
How to make toon (cel) shader with 3 colors so that I can change each of the three colors?
How to make toon (cel) shader with 3 colors so that I can change each of the three colors in Unity 5? I have this shader, but i can't correct colors.
Shader "Example/Diffuse Texture" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf SimpleLambert
half4 LightingSimpleLambert (SurfaceOutput s, half3 lightDir, half atten) {
half NdotL = dot (s.Normal, lightDir);
half4 c;
c.rgb = s.Albedo * _LightColor0.rgb * round(saturate(NdotL * atten)*3)/3;
c.a = s.Alpha;
return c;
}
struct Input {
float2 uv_MainTex;
};
sampler2D _MainTex;
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
}
ENDCG
}
Fallback "Diffuse"
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612133804im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity 5: can you make a toon shader using the Standard Shader? 2 Answers
"All Engine Features" in Personal Edition ? 2 Answers
Is it possible to fit a linerenderer turn in the rotation of the parent object? 0 Answers
i need help with unity animation controller 0 Answers
Not detecting collision? 1 Answer