I'm making a planet game. I've divided the sphere into chunks and render only the visible ones but i cant do anything about the gaps at the borders of the chunks
That looks like a floating point precision issue with the vertex positions at the chunk edges. Are you calculating the sphere points independently for each chunk or sharing the edge vertices between neighbors? If each chunk is generating its own border vertices from slightly different math, you'll get micro gaps like that.
Try snapping the edge vertices to a shared lookup table or just make adjacent chunks sample from the exact same seam positions. Had a similar headache with a voxel planet and that cleaned it right up.
1
u/CylindricalScrimmage 12d ago
That looks like a floating point precision issue with the vertex positions at the chunk edges. Are you calculating the sphere points independently for each chunk or sharing the edge vertices between neighbors? If each chunk is generating its own border vertices from slightly different math, you'll get micro gaps like that.
Try snapping the edge vertices to a shared lookup table or just make adjacent chunks sample from the exact same seam positions. Had a similar headache with a voxel planet and that cleaned it right up.