use trifid's magic resolution ratio and hope that it's correct

This commit is contained in:
JohnCorby 2022-07-13 22:16:25 -07:00
parent 5bd5ec4950
commit 843f271b4f
2 changed files with 7 additions and 3 deletions

View File

@ -33,11 +33,15 @@ 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, but only at the equator.
/// </summary>
[Range(0, int.MaxValue)] [DefaultValue(51)]
public int resolution = 51;
[Range(0, int.MaxValue)] [DefaultValue((int)(51 * RESOLUTION_RATIO))]
public int resolution = (int)(51 * RESOLUTION_RATIO);
}
}

View File

@ -466,7 +466,7 @@ namespace NewHorizons.Handlers
if (body.Config.HeightMap != null)
{
HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, body.Config.HeightMap.resolution);
HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, (int)(body.Config.HeightMap.resolution / HeightMapModule.RESOLUTION_RATIO));
}
if (body.Config.ProcGen != null)