mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix heightmap seam
This commit is contained in:
parent
15d3b909c4
commit
96a08e4356
@ -132,6 +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;
|
||||||
|
|
||||||
float relativeHeight = heightMap.GetPixel((int)sampleX, (int)sampleY).r;
|
float relativeHeight = heightMap.GetPixel((int)sampleX, (int)sampleY).r;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user