It is a dark place out there, especially at night. I’ve made some huge progress on the engine the past few weeks. I threw away my threading code and started focusing on getting some rendering features working. Instead of using threads, I currently just use a work queue where maximum one task is executed per frame. After some clean ups I will identify the critical sections and create a more robust threading/worker system. But for now, it works well enough apart from some hiccups.
While implementing the lighting code, It took me some effort to get the flood fill algorithm working across chunks. The problem with chunks is that you have to think twice, because there are a lot more (literally) edge cases