I need to take a ramp gradient and apply it as a texture to an arbitrary 2D shape from it’s edges inward. As an example, a special case of this would be a spherical gradient applied to a circle. I need to apply this many times over so anything requiring manual mapping would not be suitable.

Could anyone help me with this? I’ve run searches but I don’t appear to be using the correct terms to home in on what I’m looking for.