Fix #112180. #112962

Merged
Omar Emara merged 2 commits from Hoshinova/blender:fix-112180 into main 2023-09-27 18:01:24 +02:00
1 changed files with 3 additions and 2 deletions

View File

@ -381,8 +381,9 @@ BLI_INLINE float noise_grad(uint32_t hash, float x, float y, float z, float w)
BLI_INLINE float floor_fraction(float x, int &i)
{
i = int(x) - ((x < 0) ? 1 : 0);
return x - i;
float x_floor = math::floor(x);
i = int(x_floor);
return x - x_floor;
}
BLI_INLINE float perlin_noise(float position)