From 70fe973810fd0b13a1cdc2a086fea440e1e365eb Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 7 Feb 2025 12:34:54 +0100 Subject: [PATCH] Invert the logic of the isolevel brush smoothness calculation so it works as expected. --- modules/terraman/editor/terrain_world_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/terraman/editor/terrain_world_editor.cpp b/modules/terraman/editor/terrain_world_editor.cpp index 02c1f0e03..6775d70af 100644 --- a/modules/terraman/editor/terrain_world_editor.cpp +++ b/modules/terraman/editor/terrain_world_editor.cpp @@ -394,7 +394,7 @@ void TerrainWorldEditor::isolevel_brush_draw(const Vector3 &p_world_position) { Vector2 tv = Vector2(ilbh - ABS(x), ilbh - ABS(y)); float t = tv.length() / (float)ilbh; - float sl = Math::lerp(0, s, CLAMP(t + _isolevel_brush_smoothness, 0, 1)); + float sl = Math::lerp(0, s, CLAMP(t + 1 - _isolevel_brush_smoothness, 0, 1)); float npil = 0;