feat: heightmap-inputs

This commit is contained in:
MihailRis
2024-10-16 00:38:58 +03:00
parent 5e79bc07e9
commit 59c4e26eda
10 changed files with 76 additions and 14 deletions
+6
View File
@@ -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]));
}
}