Fresnel to Cel shader?

I just was wondering about something to do with fresnel shaders…

If you could make a Fresnel-like shader that just rendered a black line at the edges of a mesh, rather than a color or texture, wouldn’t that, in theory, be like a Cel shader? I don’t know really anything about shaders, but I thought something like this may be possible… It’d probably be really weird because, at least the one I have just adds a color based on the angle to the camera, instead of only the outermost parts.

EDIT: Yep, new question already. Is there a way to tell a shader to only render something is there’s nothing behind that point, or is that not possible? If you could do that, you could simply tell it not to render the extra part on the edge when there’s something behind it, giving you the exact effect of a cel-shader on the material rather than any post-processing effect

Shader "Example/RimWorldRefl" { Properties { _MainTex ("Texture", 2D) = "white" {} _Cube ("Cubemap", CUBE) = "" {} _RimPower ("Rim Power", Range(0.5,8.0)) = 3.0

}
SubShader {
   Tags { "RenderType" = "Opaque" }
   CGPROGRAM
   #pragma surface surf Lambert
   struct Input {
       float2 uv_MainTex;
       float3 worldRefl;
       float3 viewDir;
   };
   sampler2D _MainTex;
   samplerCUBE _Cube;
   float _RimPower;
   void surf (Input IN, inout SurfaceOutput o) {
       o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb * 0.5;
       half rim = saturate(dot (normalize(IN.viewDir), o.Normal));
       o.Emission = texCUBE (_Cube, IN.worldRefl).rgb * pow(rim,_RimPower);
   }
   ENDCG
} 
Fallback "Diffuse"
}

Still, if anyone knew a way to modify this script to make the color added at the rim any color and just be more sudden (no fading, it’s either there or it’s not) I’d like to mess with it.

Woa, actually, this is really cool. If you just add something like *2 to o.Normal on line 18, you get a basic cel shading effect. Only trying this with primitives, will test more later