Shader for texture blending with a sharp outline.

Im really hoping someone can help me with this.

Im trying to customize how two textures should blend. What I want is a sharp nonuniform outline on the edge of a texture. (Illustrated with the red line below) How can I do this?

Right now im testing on a model, but is it possible to customize the unity terrain shaders to work like this?

30898-blending.png

Update
Rust has sort of done this here:
Rust texture blending

But since i want to blend together two solid colors, it should be easier.

In ToonTerrain.cginc line 44 Splitmap function, change value 0.1 to 0.4 for outline effect.