How to achieve a "dark" landscape layer transition?

Hey,

For example from grass to dirt, the dirt should be darker on spots where it blends with the grass.
Does anybody have an idea?

Cheers, Paul