Fix heightmap generators when used with VoxelLodTerrain in blocky mode

This commit is contained in:
Marc Gilleron 2021-10-08 02:35:52 +01:00
parent ceb8553e4a
commit a2096b2014

View File

@ -82,7 +82,7 @@ protected:
// Output is blocky, so we can go for just one sample
float h = params.range.xform(height_func(gx, gz));
h -= origin.y;
int ih = int(h);
int ih = int(h) >> lod;
if (ih > 0) {
if (ih > bs.y) {
ih = bs.y;