Open Chailotl opened 6 years ago
Currently working on a more robust and independent chunk system where chunks have defined states (Fresh, Prepped, Generating, Loaded, Rendered) and do redundancy checks for it's neighbor chunks (I like to call them its cardinal chunks).
When rendering, the chunks shouldn't care whether it has its cardinal chunk's blocks or not, and can simply add those faces in later after being pinged by its cardinal chunks.
Chunk A is loaded — Chunk B is prepped Chunk A begins to render, and asks Chunk B for its blocks, which it does not have Chunk A finished rendering, missing a side for Chunk B Chunk B begins to generate Chunk B finished generating, and pings Chunk A about it Chunk A asks Chunk B for its blocks, and then finishes rendering its mesh
This system seems to have fixed the instability, but it's also rather rigid with its defined cardinal chunks, and proves entirely inflexible for grass CTM. It also seems to have missing edge meshes, and causes some errors.
Perhaps chunks that need to reach into another chunk should generate their blocks if need be?
The chunk system seems to destabilize at high (+6) view ranges, where a large portion of chunks do not render. Forceable rendering of them sometimes causes an error in Unity: