This is the best way I could possibly phrase this question.
What I want to do is mix two different materials.
I want to use the secondary material to catch the rimlight of the object, but I only want this effect to show up close to the border of an object.
Simply using the angles of the faces will result in too much spill of the secondary material over the primary material. This only works on a simple object, where the falloff angle of the polygons is even.
Is there a way to create a mask within the shader editor to basically create a blurred outline within the object border? I want to avoid using the compositor for this.