mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make heightmap res ratio right
This commit is contained in:
parent
96a08e4356
commit
f4ee3d9b49
10
NewHorizons/External/Modules/HeightMapModule.cs
vendored
10
NewHorizons/External/Modules/HeightMapModule.cs
vendored
@ -1,4 +1,4 @@
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@ -33,15 +33,13 @@ namespace NewHorizons.External.Modules
|
||||
/// </summary>
|
||||
public string textureMap;
|
||||
|
||||
// blame trifid if this ratio is wrong
|
||||
public const float RESOLUTION_RATIO = 256 / 51f;
|
||||
|
||||
/// <summary>
|
||||
/// Resolution of the heightmap.
|
||||
/// Higher values means more detail but also more memory/cpu/gpu usage.
|
||||
/// This value will be 1:1 with the heightmap texture width, but only at the equator.
|
||||
/// </summary>
|
||||
[Range(0, int.MaxValue)] [DefaultValue((int)(51 * RESOLUTION_RATIO))]
|
||||
public int resolution = (int)(51 * RESOLUTION_RATIO);
|
||||
[Range(50, 2000)]
|
||||
[DefaultValue(200)]
|
||||
public int resolution = 200;
|
||||
}
|
||||
}
|
||||
@ -466,7 +466,8 @@ namespace NewHorizons.Handlers
|
||||
|
||||
if (body.Config.HeightMap != null)
|
||||
{
|
||||
HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, (int)(body.Config.HeightMap.resolution / HeightMapModule.RESOLUTION_RATIO));
|
||||
var res = (int)(body.Config.HeightMap.resolution / 4);
|
||||
HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, res);
|
||||
}
|
||||
|
||||
if (body.Config.ProcGen != null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user