Currently the game runs fine up to render distance 16, but I want to go up to way bigger render distances, like 64.
I also want the maximum height to go up to 1024 instead of the current 512, in order to create huge landscapes.
For the game to render way more terrain without lagging, it needs a Level Of Detail (LOD) management system.
The basic principle is that faraway chunks don't need to be displayed in the full resolution of 32x32x32 blocs;
16x16x16 or even 8x8x8 will be enough if the chunk is really far from the camera.
This will allow the game to render way less quads, and thus render a bigger terrain faster.
TODO
[x] #2
[x] Enable the meshing function to produce mesh at differents LODs (powers of 2)
[x] Create a mapping between chunk distance and LOD.
Ex: [8, 16, 32] -> 1/2 resolution beyond dist 8, 1/4 beyond dist 16 and 1/8 beyond dist 32
[x] Choose correct LOD when meshing
[x] Queue chunks for remeshing when they get closer (or farther)
Currently the game runs fine up to render distance 16, but I want to go up to way bigger render distances, like 64. I also want the maximum height to go up to 1024 instead of the current 512, in order to create huge landscapes.
For the game to render way more terrain without lagging, it needs a Level Of Detail (LOD) management system.
The basic principle is that faraway chunks don't need to be displayed in the full resolution of 32x32x32 blocs; 16x16x16 or even 8x8x8 will be enough if the chunk is really far from the camera. This will allow the game to render way less quads, and thus render a bigger terrain faster.
TODO