Skip to content
Snippets Groups Projects
Commit 83cf361e authored by Felix Buenen's avatar Felix Buenen
Browse files

calculate normals before applying procedural shader

parent 7ac112c4
No related branches found
No related tags found
No related merge requests found
......@@ -82,10 +82,9 @@ public class MeshGenerator : MonoBehaviour
mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;
mesh.vertices = vertices;
mesh.triangles = triangles;
mesh.RecalculateNormals();
GetComponent<ProceduralShader>().SetColors(mesh, heightmap, subdivisions, vertices.Length);
mesh.RecalculateNormals();
}
private void OnDrawGizmos()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment