So I have a water texture that I’ve created, and it works when I apply it to a normal object in the scene, but when I actually have it on my waves, it doesn’t appear at all and all I have is a matte color.
private Vector2[] GenerateUVs()
{
var uvs = new Vector2[Mesh.vertices.Length];
//Always set one UV over n tiles then flip the uv and set it again
for (int x = 0; x <= Dimension; x++)
{
for (int z = 0; z <= Dimension; z++)
{
var vec = new Vector2((x / UVScale) % 2, (z / UVScale) % 2);
uvs[index(x, z)] = new Vector2(vec.x <= 1 ? vec.x : 2 - vec.x, vec.y <= 1 ? vec.y : 2 - vec.y);
}
}
return uvs;
}
Unfortunately that breaks it further; not only does the shader not get applied, but it loses the values on higher Y values being blended into a darker color.
If that line by itself breaks things further than it’s either a shader issue, or still a UV issue. Try slapping a built in shader onto that same mesh and see if it’s still broken. Maybe with a simple grid texture to make sure the UVs are something sensible.