I am programming the editor for a RTS game and I have created the following:

I am trying to modify the terrain so that it is not completely grassy. I am intending to add functionality so that I can create paths while playing the game. I already have created a blendmap that someone here recommended for me, but that does not allow the user to edit the texture while using the app, but only after drawing an image and saving it to the game folder. I fiddled with the shaders a bit, but I was only able to add a square that is able to move, but it does not leave a path behind it. Here is an example of what I am working towards. I have not been able to find any resources that really shows what I need.
Here is a snippet of the code:
if(((tiledCoords.x - mouseTexCoords.x) < 4) && ((tiledCoords.x - mouseTexCoords.x) > 0))
{
if(((tiledCoords.y - mouseTexCoords.y) < 4) && ((tiledCoords.y - mouseTexCoords.y) > 0))
{
blendMapColor.g = 1;
//rTextureColor = texture(rTexture, tiledCoords) * 1;
}
}
With these if statements, it checks to see if the mouse is over a certain area within a few units, and if it is, it changes the terrain texture to a sand texture. However, it is unsuccessful in being able to create paths, but rather, a mere square that can move around the landscape.
Thank you all in advance!