Fix heightmap generators when used with VoxelLodTerrain in blocky mode

master
Marc Gilleron 2021-10-08 02:35:52 +01:00
parent ceb8553e4a
commit a2096b2014
1 changed files with 1 additions and 1 deletions

View File

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