Is there any way to determine if a coordinate is placed internally or outside of the mountains? I know it's obvious visually, but you will need a node logic that masks shore for all external areas. If you could describe yourself the way you distinguish internal areas from external you will have a clear vision of what your graph should be. As Mr Logan said you are trying to create closed node circle. Did I get it right that you are going to paint with specific texture in areas where some sort of grass grows? If so then I guess it would be easier to paint with this texture first and then use it's texture output as a mask for that type of grass.