feat: noise modifier will only add height
Or remove height with a negative amplitude
This commit is contained in:
parent
20de012dca
commit
3f233a176f
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ float TerrainModifierNoise::evaluate_at(Vector2 world_coordinates, float before)
|
|||
if (this->noise.is_null()) {
|
||||
return before;
|
||||
}
|
||||
return this->noise_amplitude * (this->noise_buffer->get_noise_2d(world_coordinates.x, world_coordinates.y) * 0.5f + 0.5f) + before;
|
||||
return 0.5f * this->noise_amplitude * (this->noise_buffer->get_noise_2d(world_coordinates.x, world_coordinates.y) + 1.f) + before;
|
||||
}
|
||||
|
||||
void TerrainModifierNoise::set_noise(Ref<Noise> noise) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue