You just need to calculate a Lerp factor to blend the two textures together. You should define a blending area. For example everything below the height of 20 should take the first texture, above the second one. In addition to the 20 you define a blendAreaSize of 2.5 for example.
The Lerp value would be something like
L = clamp((pos.y- blend height - blendAreaSize*0.5) / blendAreaSize)
I’m writing on my tablet, so I can’t tell got the exact syntax, but this should do the trick.
L will be a value that is 0 for y values below 18.75 and 1 for everything above 21.25.
In between it would linearly blend from 0 to 1. Now you just need to use Lerp with your two color values