make downsampler a bit smarter
Improves the performance when using many samples (at the cost of hurting performance when using very few samples)
Improves the performance when using many samples (at the cost of hurting performance when using very few samples)