Material °Angle° detection

Trying to create a material where face angles are highlighted, creating this effect:

So far the only solution I can find uses TexCoords (the closer the face is to coords 0 or 1 the brighter it gets), like this:

The issue with this is, of course, that this may work with a simple shape like a cube, but causes issues with almost any other shape:

Does anyone have ideas on alternative approaches to this?

Fresnel (depending on the camera angle) and depth buffer (highlighting just the outline, not the shape) seem to be leading nowhere.

1 Like

I think you can do it with VertexNormal