feat(editor): height scale tool for terrain relief control

- Scale Heights: multiply all terrain heights by a factor (0.1x - 5.0x)
- >1.0 exaggerates relief (deeper valleys, taller peaks)
- <1.0 flattens terrain toward base height
- Re-stitches all chunk edges after scaling for seamless results
- Workflow: noise → smooth → scale → clamp for precise control
This commit is contained in:
Kelsi 2026-05-05 05:55:05 -07:00
parent ff33babb1d
commit 9322d37b81
3 changed files with 25 additions and 1 deletions

View file

@ -404,8 +404,15 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
app.getTerrainEditor().clampHeights(clampMin, clampMax);
app.showToast("Heights clamped");
}
ImGui::Separator();
static float hScale = 1.5f;
ImGui::SliderFloat("Height Scale", &hScale, 0.1f, 5.0f, "%.2f");
if (ImGui::Button("Scale Heights", ImVec2(-1, 0))) {
app.getTerrainEditor().scaleHeights(hScale);
app.showToast("Heights scaled");
}
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1),
"Generate, smooth, then clamp for controlled range");
"Exaggerate (>1) or flatten (<1) terrain relief");
}
ImGui::Separator();