mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
feat: heightmap-inputs
This commit is contained in:
parent
5e79bc07e9
commit
59c4e26eda
10 changed files with 76 additions and 14 deletions
|
|
@ -105,3 +105,9 @@ void Heightmap::crop(
|
|||
height = dstheight;
|
||||
buffer = std::move(dst);
|
||||
}
|
||||
|
||||
void Heightmap::clamp() {
|
||||
for (uint i = 0; i < width * height; i++) {
|
||||
buffer[i] = std::min(1.0f, std::max(0.0f, buffer[i]));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue