Skip to content

Custom light engine

Moritz Zwerger requested to merge work/light into master

After a break this MR finally brings the light engine I was waiting for...

(also some bugfixes, changes a lot of other code, breaks a lot of stuff in order to do more rendering async and improve the performance a lot)

Light tasks:

  • Fix some bugs (e.g. placing 3 torches and destroying one)
  • Decreasing: Ignore direction
  • Top and bottom light
  • Synchronize light recalculation (clearing light is buggy)
  • Benchmark and compare to Startlight
  • Recalculate section if edge block light changes: cullface
  • recalculate light when solid block changes
  • check if light can only go in a direction (otherwise not really realistic, it might can reflect from solid material)
  • Light wrong when neighbours are null (edge chunks)
    • or if section is getting created
  • check if correct blocks propagate light correctly (aka. is isSolid correct)
  • trace block light through null sections
  • light is not passing through grass
  • check if light can enter block at side (if block is directly next to source)
  • mark chunk as updated on skylight change
  • Profiling [sometimes placing a block takes 1+ frame to be complete]
  • Skylight
    • Heightmap
    • Possibility to mix light
    • Calculate skylight
    • handle heightmap changes
    • handle block changes
    • fluid (water should start flood fill)
    • trace through null sections
  • disable light debug mode
  • Testing, testing, testing
  • [?] light propagation direction (e.g. dirt path)
  • check some light todos
  • decreasing light algorithm
  • check shapes of neighbour (could be done with the culling code, but that even slows down the)
  • light when loading chunks (multi threading bug?)
  • bare trace (i.e. not creating a section if no blocks are present)
  • light not passing through redstone dust, flowers or water
  • light filtering blocks (e.g. water, slime block, ...)
  • check cobwebs
  • light is sometimes not propagating from neighbours correctly (see start from torch)
  • border light decreases
  • check stairs

Closes #44 (closed)

Edited by Moritz Zwerger

Merge request reports

Loading