im not sure what ddx or ddy or cross do, but i think youre over complicating this. You can use landscape layer coords node as a texture coordinate and plug it into the textures. then use landscape layer blend to blend each of the textures together. when painting them on the landscape you can use a desired texture mask.
This material automatically detects the direction the normal is facing and lerps between them (World aligned blend) The issue Im having is in some areas where I lerp the two colors it causes this weird blending artifact.
I have issues like this as well for some reason when using the alpha pin from world aligned blend, i dont know what the reasoning is behind it but i seen to get better more expected results using the w/ explicit normals pin. With the alpha pin i get strange blending, and it makes my material look like crumpled paper.