This commit is contained in:
JohnCorby 2022-07-21 16:33:16 -07:00
parent c131661761
commit cc9adcf732
2 changed files with 3 additions and 3 deletions

View File

@ -132,7 +132,7 @@ namespace NewHorizons.Builder.Body.Geometry
float sampleX = heightMap.width * longitude / 360f; float sampleX = heightMap.width * longitude / 360f;
float sampleY = heightMap.height * latitude / 180f; float sampleY = heightMap.height * latitude / 180f;
if (sampleX > heightMap.width) sampleX -= heightMap.width; if (sampleX > heightMap.width) sampleX -= heightMap.width; // TODO: find out if this actually doesnt anything
float relativeHeight = heightMap.GetPixel((int)sampleX, (int)sampleY).r; float relativeHeight = heightMap.GetPixel((int)sampleX, (int)sampleY).r;

View File

@ -65,7 +65,7 @@ namespace NewHorizons.Builder.Body
if (useLOD) if (useLOD)
{ {
var level2Res = (int)Mathf.Clamp(resolution / 2f, 35, 100); var level2Res = (int)Mathf.Clamp(resolution / 2f, 1 /*cube moment*/, 100);
var level2 = MakeLODTerrain(cubeSphere, heightMap, textureMap, module.minHeight, module.maxHeight, level2Res, stretch); var level2 = MakeLODTerrain(cubeSphere, heightMap, textureMap, module.minHeight, module.maxHeight, level2Res, stretch);
var LODGroup = cubeSphere.AddComponent<LODGroup>(); var LODGroup = cubeSphere.AddComponent<LODGroup>();