I would suggest generating erosion on the terrain using a dedicated tool like WorldMachine or Terragen or the like. This will make a splat map for you, which you can use in a Composite node as your layer masks. To isolate the RGB color channels you can use Color Correction nodes, or even easier just use a single OSL Uber…