You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fractal noise with zero octaves behave as if they have one. Here's the code of the Perlin fractal fbm for example (but it is the same issue with all fractal noises):
fn single_perlin_fractal_fbm(&self, mut x: f32, mut y: f32) -> f32 {
let mut sum = self.single_perlin(self.perm[0], x, y);
let mut amp = 1.0;
let mut i = 1;
while i < self.octaves {
x *= self.lacunarity;
y *= self.lacunarity;
amp *= self.gain;
sum += self.single_perlin(self.perm[i as usize], x, y) * amp;
i += 1;
}
sum * self.fractal_bounding
}
The problem comes from the fact that if you set the number of octaves to 0, fractal_bounding is not recomputed as 0 but 1, thus giving a nonzero noise with no octaves.
The text was updated successfully, but these errors were encountered:
Fractal noise with zero octaves behave as if they have one. Here's the code of the Perlin fractal fbm for example (but it is the same issue with all fractal noises):
The problem comes from the fact that if you set the number of octaves to 0,
fractal_bounding
is not recomputed as 0 but 1, thus giving a nonzero noise with no octaves.The text was updated successfully, but these errors were encountered: