I've build this special node shader that is useful for instantly blending objects with the terrain.
it wasn't something very quick to build, because it was necessary to reconstruct the light calculation models from scratch in order to have a perfect blending along the intersection edges...
I'm sure that recreating the shader rewriting it in glsl code would allow me to make some significant improvements that I can't do with nodes.