Skip to content

Commit

Permalink
Update terrain_3d_editor.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtarsia committed Oct 9, 2024
1 parent 5d1a2ce commit eeda5b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/terrain_3d_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ void Terrain3DEditor::_operate_map(const Vector3 &p_global_position, const real_
real_t spray_strength = CLAMP(strength * 0.05f, 0.004f, .25f);
real_t brush_value = CLAMP(brush_alpha * spray_strength, 0.f, 1.f);
if (enable_texture && brush_alpha * strength * 11.f > 0.1f) {
if (base_id == overlay_id && blend < 0.004f) {
overlay_id = asset_id;
}
// If overlay and base texture are the same, reduce blend value
if (base_id == asset_id) {
blend = CLAMP(blend - brush_value, 0.f, 1.f);
Expand Down

0 comments on commit eeda5b0

Please sign in to comment.