ergor/mcworld

Re-do the rendering mechanism

Opened this issue · 0 comments

ergor commented

Currently the rendering works on a per source height map basis.
But it should be working on a per chunk basis.

I.e. now it takes a height map and figures out which chunks they will become. But it should be the reverse; it should take a chunk coordinate, and figure out what source height map it needs to read from as well as which points it needs to read.

The rendering should be able to render any 1 chunk, fully independently from other chunks.

It should work as follows:

  • The program shall take as input what real-world coordinate should be defined as in-game block coordinate (0, 0).
  • Given a chunk coordinate, the renderer should select the appropriate source height map, or height maps if the chunk overlaps multiple source height maps.

The chunk first approach is better suited for streaming live data, e.g. for use in a server plugin with live data loading.