diff --git a/VoxelEngine.Tests/WorldGen/BiomeTests.cs b/VoxelEngine.Tests/WorldGen/BiomeTests.cs index acdfbaa..9942b17 100644 --- a/VoxelEngine.Tests/WorldGen/BiomeTests.cs +++ b/VoxelEngine.Tests/WorldGen/BiomeTests.cs @@ -20,8 +20,8 @@ public class BiomeTests { var blocks = new BlockRegistry(); var biomes = new BiomeRegistry(42, blocks); - Assert.Equal("Stone", biomes.Mountains.TopBlock(70).Name); - Assert.Equal("Snow Block", biomes.Mountains.TopBlock(120).Name); + Assert.Equal("Stone", biomes.Mountains.TopBlock(200).Name); // below snow line + Assert.Equal("Snow Block", biomes.Mountains.TopBlock(420).Name); // above snow line (384) } [Fact] diff --git a/VoxelEngine.Tests/WorldGen/TerrainSamplerTests.cs b/VoxelEngine.Tests/WorldGen/TerrainSamplerTests.cs index 20beeea..b020a56 100644 --- a/VoxelEngine.Tests/WorldGen/TerrainSamplerTests.cs +++ b/VoxelEngine.Tests/WorldGen/TerrainSamplerTests.cs @@ -43,11 +43,11 @@ public class TerrainSamplerTests for (int x = -200; x < 200; x += 3) for (int z = -200; z < 200; z += 3) { - // The dense blur removes inter-biome cliffs (those would be 25+ blocks). - // Remaining deltas are rugged intra-Mountains ridged slopes (~9), which - // are intended terrain, not cliffs; 16 separates the two. + // The dense blur removes inter-biome cliffs. Remaining deltas are + // rugged intra-Mountains ridged slopes, now ~4x larger after the + // 128->512 rescale; 64 separates intended slopes from true cliffs. int dx = System.Math.Abs(sampler.HeightAt(x, z) - sampler.HeightAt(x + 1, z)); - Assert.True(dx <= 16, $"height jump {dx} at ({x},{z})"); + Assert.True(dx <= 64, $"height jump {dx} at ({x},{z})"); } } } diff --git a/World/WorldGen/Biomes/DesertBiome.cs b/World/WorldGen/Biomes/DesertBiome.cs index 9cbc554..4f4c87f 100644 --- a/World/WorldGen/Biomes/DesertBiome.cs +++ b/World/WorldGen/Biomes/DesertBiome.cs @@ -18,8 +18,8 @@ public sealed class DesertBiome : IBiome } public float SampleHeight(NoiseSource noise, float worldX, float worldZ) - => WorldConstants.SeaLevel + 4f * noise.Continent(worldX, worldZ) - + 1.5f * this._detail.GetNoise(worldX, worldZ); + => WorldConstants.SeaLevel + 16f * noise.Continent(worldX, worldZ) + + 6f * this._detail.GetNoise(worldX, worldZ); public IBlock TopBlock(int worldY) => this.Surface.Top; } diff --git a/World/WorldGen/Biomes/ForestBiome.cs b/World/WorldGen/Biomes/ForestBiome.cs index 4dffead..96f31b8 100644 --- a/World/WorldGen/Biomes/ForestBiome.cs +++ b/World/WorldGen/Biomes/ForestBiome.cs @@ -18,8 +18,8 @@ public sealed class ForestBiome : IBiome } public float SampleHeight(NoiseSource noise, float worldX, float worldZ) - => WorldConstants.SeaLevel + 6f * noise.Continent(worldX, worldZ) - + 4f * this._detail.GetNoise(worldX, worldZ); + => WorldConstants.SeaLevel + 24f * noise.Continent(worldX, worldZ) + + 16f * this._detail.GetNoise(worldX, worldZ); public IBlock TopBlock(int worldY) => this.Surface.Top; } diff --git a/World/WorldGen/Biomes/MountainsBiome.cs b/World/WorldGen/Biomes/MountainsBiome.cs index 2737f94..d4610c8 100644 --- a/World/WorldGen/Biomes/MountainsBiome.cs +++ b/World/WorldGen/Biomes/MountainsBiome.cs @@ -4,7 +4,7 @@ namespace VoxelEngine.World.WorldGen.Biomes; public sealed class MountainsBiome : IBiome { - private const int SnowLine = 96; + private const int SnowLine = 384; private readonly FastNoiseLite _ridged; private readonly IBlock _stone; private readonly IBlock _snow; @@ -25,8 +25,8 @@ public sealed class MountainsBiome : IBiome } public float SampleHeight(NoiseSource noise, float worldX, float worldZ) - => WorldConstants.SeaLevel + 10f * noise.Continent(worldX, worldZ) - + 45f * this._ridged.GetNoise(worldX, worldZ); + => WorldConstants.SeaLevel + 40f * noise.Continent(worldX, worldZ) + + 200f * this._ridged.GetNoise(worldX, worldZ); public IBlock TopBlock(int worldY) => worldY >= MountainsBiome.SnowLine ? this._snow : this._stone; } diff --git a/World/WorldGen/Biomes/PlainsBiome.cs b/World/WorldGen/Biomes/PlainsBiome.cs index 7ec1731..872db34 100644 --- a/World/WorldGen/Biomes/PlainsBiome.cs +++ b/World/WorldGen/Biomes/PlainsBiome.cs @@ -18,8 +18,8 @@ public sealed class PlainsBiome : IBiome } public float SampleHeight(NoiseSource noise, float worldX, float worldZ) - => WorldConstants.SeaLevel + 6f * noise.Continent(worldX, worldZ) - + 2f * this._detail.GetNoise(worldX, worldZ); + => WorldConstants.SeaLevel + 24f * noise.Continent(worldX, worldZ) + + 8f * this._detail.GetNoise(worldX, worldZ); public IBlock TopBlock(int worldY) => this.Surface.Top; }