Yep. Like Waldronate says.
In Gimp, what photoshop calls angular is called COnical (and there are two.. your example would be asymmetrical. There si also symmetrical, which uses the gradient over 180 degrees and its mirror on the other half).
I was clear in one or two places, then started to shorthand. The fill for the mountains was "Shaped (Angular)" There is also "Shaped (Spherical)" and "Shaped (Dimpled)". ALl three of these have the gradient painted perpendicular to the selection outline.
A way that mmight work to manually do it in PS (at least in greyscale) would be to determine the maximum distance across the selection (perpendicular) call it D. Start with a black background, set paint to white with an opacity of 1.
Shrink the selection by (D/255) and fill the selection... repeat until no selection left....
Try it as an action....