veloren/world
Joshua Yanovski 7d6aebb316 Fix hacky solution with proper defragmentation.
After generating a chonk, we now find the highest frequency block (in
terms of the number of groups that uniformly consist of that block) and
replace the chunk's default with that one.  We also resort the data in
the process to be in the same order as the original array index.  This
improves our memory savings from 3x to almost 7x, and brings us within a
factor of 3 or so of what I hope a true average will be.

The defragmentation is not totally optimal and can probably be improved
from a performance perspective, but given how much of a hard bottleneck
RAM is this seems worthwhile.  Also, this doesn't suffer from the issues
the previous solution did.
2020-09-28 16:56:26 +02:00
..
examples (See sharp/lod-history) LOD, shadows, greedy meshing, new lighting, perf 2020-08-20 20:34:59 +02:00
src Fix hacky solution with proper defragmentation. 2020-09-28 16:56:26 +02:00
Cargo.toml (See sharp/lod-history) LOD, shadows, greedy meshing, new lighting, perf 2020-08-20 20:34:59 +02:00