feat(editor): height clamp tool for controlled terrain range

- Clamp Heights: sets min/max height bounds across entire tile
  (DragFloatRange2 slider for min/max, -500 to 2000 range)
- Useful workflow: Generate noise → Smooth → Clamp to desired range
- Prevents terrain from going underground or too high
- All affected chunks marked dirty for mesh regeneration
This commit is contained in:
Kelsi 2026-05-05 05:51:03 -07:00
parent c93a997424
commit d59d69b0c5
3 changed files with 32 additions and 1 deletions

View file

@ -57,6 +57,9 @@ public:
// Global smooth pass across entire tile (N iterations)
void smoothEntireTile(int iterations);
// Clamp all heights to a min/max range
void clampHeights(float minH, float maxH);
// Import/export heightmap (raw 16-bit grayscale, 129x129)
bool importHeightmap(const std::string& path, float heightScale);
bool exportHeightmap(const std::string& path, float heightScale);