This PR adds lighting to the world. By default, lighting is disabled to keep fps high. To enable lighting, add -l to your launch args and your set! If you decide you want to turn lighting on, make sure your using a fresh map because any changes you make won't update the light map when lighting is off. Example:
TODO:
Document code
Clean up code
Multi-thread it!
There is a bug I'm aware of having to do with global lighting where, if the global light updates a chunk 2 chunks below where the block was destroyed, it won't update. But, the map is too small to run into this problem yet. Later I want to update the algorithm to make it smarter.
Make global light respond to time of day. There is a parameter in Chunk#calculateLighting(...) to set the global light for that chunk.
This PR adds lighting to the world. By default, lighting is disabled to keep fps high. To enable lighting, add
-l
to your launch args and your set! If you decide you want to turn lighting on, make sure your using a fresh map because any changes you make won't update the light map when lighting is off. Example: TODO:Chunk#calculateLighting(...)
to set the global light for that chunk.And please review and give feedback!