While progress is going well, I need to step back and fix a few of the issues in my project. One of these issues is lack of continuity on the surface normals. Another, different but related issue is holes in the mesh. Both of these happen between the different mesh segments.
So far, I’ve fixed the second issue by rewriting unity’s normal calculation code. Since the normals were calculated per mesh, the neighbouring mesh’s edge vertices weren’t taken into account when generating that edge, resulting in the seam.
Set things to used before starting a thread, not once the thread starts! In the time taken for the thread to start, something else might try to acquire it as well.
If the near plane is too far away from the camera, when you’re near the surface, nearby terrain will not be drawn. However, if the near plane is set to closely, when you’re far away, Z buffer accuracy is lost, resulting in Z-fighting of the water and the planet.
To have the view distance set up correctly, and not get Z-fighting, a dynamic near / far plane system had to be implemented. When far away from the planet, the near plane was moved further away from the camera, and when nearer the planet, the far plane was drawn in towards the camera.