Hi!
Ive been messing around with procedural generation of terrain and cant get the terrain edges to look seamless. I believe this is thanks to the texture/material continuing down the positive sides of the terrain as you can see this does not happen on the negative sides as the texture does not continue down those sides:
Here is the code:
void GenerateNewTerrain(Vector2 currentVector)
{
TerrainData tD = new TerrainData();
tD.heightmapResolution = width;
tD.size = new Vector3(width, depth, height);
tD.SetDetailResolution(1024, 32);
tD = GenerateTerrain(tD, (int)currentVector.x, (int)currentVector.y);
tD.alphamapResolution = width;
tD.baseMapResolution = width;
GameObject terrain;
terrain = Terrain.CreateTerrainGameObject(tD);
terrain.GetComponent<Terrain>().materialTemplate = mat;
terrain.GetComponent<Terrain>().groupingID = 1;
terrain.GetComponent<Terrain>().allowAutoConnect = true;
terrain.tag = "Terrain";
terrain.transform.position = new Vector3(currentVector.x, transform.position.y, currentVector.y);
updateOnce = true;
}
All i want to do is to get seamless tiling terrain and i think all i have to do is make sure the texture doesnt run down the sides. By changing the shader to unlit the problem got solved but it wont work with my planned day and night cycle.
Please tell me if any more information is needed.
Thanks in advance!