building-blocks icon indicating copy to clipboard operation
building-blocks copied to clipboard

Add ModalDownsampler

Open superdump opened this issue 4 years ago • 2 comments

Something like this I think. In the test I was trying to use 1x1x1 lod0 chunks and a 2x2x2 superchunk and lod0 extent, thinking that it would downsample the 2x2x2 extent of lod0 to a 1x1x1 lod1, but I hit the assertion on the dst shape being Point3i::ZERO. I don't understand why.

superdump avatar Apr 28 '21 22:04 superdump

I've tried it for my blocky voxel terrain stuff and it's really slow. Perhaps it's useful for someone?

superdump avatar Apr 29 '21 07:04 superdump

Maybe you could add a benchmark in building_blocks_storage/benches/sampling.rs so we can compare actual numbers?

I also suspect that using the SmallKeyHashMap would help. It would be even better if we could assume that the voxel type was an index into an array.

bonsairobo avatar Apr 29 '21 16:04 bonsairobo