I am trying to have each biome have different noise, and then blend the borders for a somewhat realistic transition, instead of glitched edges.
However, this super jagged terrain appears when I try to do it, there are gaps.
I have a BiomeManager class that handles blending and biome creation.
A biome struct.
A VoxelChunk class which generates each chunk, generates biome noise, sends it to BiomeManager for it to select a biome, mix biome noises for terrain blending and sends the info back to VoxelChunk to generate blocks based on it.
A block struct that is used by VoxelChunk. [not necessary to show here]
A chunkmanager class that kickstarts this whole process (It generates a selected amount of chunks and tells VoxelChunk to fill them with blocks). [not necessary to show here]
Yes, I used ChatGPT because I am unable to create terrain blending myself. It ended up commenting and reorganizing the code so it looks like everything was made with it. However, I do understand almost everything (I just don't understand some stuff in the blending functions). I am unable to fix this issue myself after trying to find tutorials on the internet, and trying to find another approach since yesterday.
The full classes code is sent below. SOLVED! look at comment