- Home /
Ramp shader with outline ?
My question is how could be possible to make this shader work with the toon outline ? Here is my shader :
Shader "PaintBall TEST/Ramp_Bumped" {
Properties {
_RimColor ("Rim Color", Color) = (0.26,0.19,0.16,0.0)
_RimPower ("Rim Power", Float) = 3
_MainTex ("Texture", 2D) = "white" {}
_BumpMap ("Bumpmap", 2D) = "bump" {}
_RampTex ("Toon Ramp (RGB)", 2D) = "gray" {}
}
SubShader{
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert
#pragma target 3.0
struct Input
{
float2 uv_MainTex;
float3 worldNormal;
INTERNAL_DATA
};
sampler2D _MainTex, _BumpMap, _RampTex;
float4 _RimColor;
float _RimPower;
void surf (Input IN, inout SurfaceOutput o)
{
o.Albedo = tex2D(_MainTex, IN.uv_MainTex).rgb;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
half3 rim = pow(max(0, dot(float3(0, 1, 0), WorldNormalVector (IN, o.Normal))), _RimPower) * _RimColor.rgb * _RimColor.a;
o.Emission = rim;
}
ENDCG
}
Fallback "Diffuse"
}
So my question is how could be make a outline into this shader ? Sorry for my english .
Comment