feat: add biome boundary blending

This commit is contained in:
2026-05-22 22:01:28 +08:00
parent 2f7ab6e29f
commit ab5f82d1cd
3 changed files with 3 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ public:
Chunk& chunk();
Random& random();
const std::array<BiomeType, 8>& neighbor_biome() const;
void generate_cave();
private:
static inline std::atomic<bool> is_init{false};
@@ -58,7 +59,6 @@ private:
unsigned m_chunk_seed = 0;
void make_biome_builder();
void generate_cave();
};
} // namespace Cubed

View File

@@ -292,7 +292,8 @@ void Chunk::gen_phase_six(
Logger::error("ChunkGenerator is Nullptr");
return;
}
// m_generator->blend_surface_blocks_borders(neighbor_block);
m_generator->blend_surface_blocks_borders(neighbor_block);
m_generator->generate_cave();
}
void Chunk::gen_phase_seven() {

View File

@@ -431,7 +431,6 @@ void ChunkGenerator::generate_terrain_blocks() {
}
m_chunk.blocks().assign(CHUNK_SIZE * CHUNK_SIZE * WORLD_SIZE_Y, 0);
m_biome_builder->build_biome();
generate_cave();
}
void ChunkGenerator::blend_surface_blocks_borders(