Set road normals

This commit is contained in:
Nahuel Rocchetti 2024-08-04 13:28:58 -03:00
parent 10d4ad5094
commit ca6f51c493

View file

@ -104,7 +104,8 @@ namespace OpenTS2.Scenes
roadMesh.SetUVs(0, uvs);
// TODO - Make this smoother, maybe generate a low res normal map from the terrain height map or calculate normals ourselves.
roadMesh.RecalculateNormals();
// roadMesh.RecalculateNormals();
roadMesh.SetNormals(new[] { Vector3.up, Vector3.up, Vector3.up, Vector3.up });
roadObject.GetComponent<MeshFilter>().sharedMesh = roadMesh;
if (!_roadMaterialLookup.TryGetValue(roadTextureName, out Material roadMaterial))