Don't normalize stretch height

This commit is contained in:
TerrificTrifid 2023-04-25 21:54:53 -05:00
parent a50feb6081
commit 6a8299f4cc

View File

@ -9,22 +9,6 @@ namespace NewHorizons.Builder.Body.Geometry
Mesh mesh = new Mesh();
mesh.name = "CubeSphere";
float max = 1;
if (stretch.x > stretch.y && stretch.x > stretch.z)
max = stretch.x;
else if (stretch.y > stretch.x && stretch.y > stretch.z)
max = stretch.y;
else if (stretch.z > stretch.x && stretch.z > stretch.y)
max = stretch.z;
else if (stretch.y == stretch.z && stretch.x > stretch.y)
max = stretch.x;
else if (stretch.x == stretch.z && stretch.y > stretch.x)
max = stretch.y;
else if (stretch.x == stretch.y && stretch.z > stretch.x)
max = stretch.z;
minHeight /= max;
maxHeight /= max;
CreateVertices(mesh, resolution, heightMap, minHeight, maxHeight);
StretchVertices(mesh, stretch);
CreateTriangles(mesh, resolution);