Gradient that look like Photoshop inner shadow

Hey guys, Would anyone know how to get the gradients to draw a kind of shadow following the shape of the polygons?

This is what I am trying to achieve.


Here’s some compositing nodes I created that mimic the look pretty well.


Hey, thanks for the efforts mate. I forgot to mention I am looking at material creation and not compositing. I guess that is not possible looking at the nodes you used.

It can be done by feeding fresnel or facing into a colorramp. That is assuming the object has rounded edges.

Will check that out and report back soon. Thanks.