How to automate landscape layer painting using a texture map

No problem, yes - you can replace the material function code with: