Shader looks weird on a procedurally generated mesh

Hello,

I made a C# script that generates mesh for an hexagon map.
For the water, I created a shader b following a tutorial.

Here is what the shader looks like on a 3D plane:

But when I assign the same material on the generated map, the result is completely different:

Here is the shader graph that controls the normal tangent:

No matter the tiling I use, I always get the same result when I apply the material to the generated mesh.

2 Answers

2

Looks like you didn’t generate UVs for your mesh.
Alternatively, you could use world position instead of UVs in your shader - that way, any adjacent meshes would join smoothly.

I think you’re right, even the lighting of the hexes with the URP’s lit material looks weird.
For using world position as the UV, this is a great idea, thank you very much!