feat: replaced sample_baked with sample

This commit is contained in:
Sara Gerretsen 2026-02-26 20:37:13 +01:00
parent 0ca27ed61e
commit 56c244ee57

View file

@ -163,13 +163,7 @@ float TerrainModifierDistance::evaluate_at(Vector2 world_coordinate, float befor
float const weight_offset{
std::clamp(distance, this->distance_weight_curve->get_min_domain(), this->distance_weight_curve->get_max_domain())
};
this->lock.unlock_shared();
this->lock.lock_exclusive();
float const weight{ this->distance_weight_curve->sample_baked(weight_offset) };
this->lock.unlock_exclusive();
this->lock.lock_shared();
float const weight{ this->distance_weight_curve->sample(weight_offset) };
float out{ weight <= 0.f ? before : Math::lerp(before, blend(before, get_thread_safe_global_position().y), weight) };
this->lock.unlock_shared();