Can't figure out how to use Vertex Color instead of VertexNormalWS to create rim offset and offset outline based on Stylised paint shader breakdown

Thank you.

So the effect I’m trying to achieve is something like


but with a texture for the rim erosion. I just want it so that wherever the camera is facing, there’s that eroded effect at the edges of the object or character. I hope it makes sense now that you see pictures of it? The problem is that I don’t want the faces to disappear depending on where I’m turning.



The erosion should always be at all the outer edges that are visible to the camera no matter what and I’d like to be able to control the intensity of the erosion, like how much it eats into the mesh, so I’m assuming there’d be a scalar parameter?

I already have the texture, it’s just I don’t know how you get the effect other than trying to make a fresnel, plug into the opacity mask, and that’s it. I looked up Sobel edge detection but I’m not sure if I’m supposed to use that here.

If possible I’d like to make an outline offset too, like in the picture below:


Preferably for the outline offset, I want it to only be visible when the mouse clicks on the object or character or whatever. If possible, change the offset distance as well as the size of the outline.