n/fractal: increment fractal pos between octave
given summation occurs with only scaling of positions between octaves, points around the origin are likely to remain self-similar between octaves. but nudging the point out range of the origin's unit surrounds we can avoid degenerate highlights.
This commit is contained in:
parent
d9f4f5116c
commit
7b9a01c790
@ -67,6 +67,7 @@ namespace util { namespace noise { namespace fractal {
|
||||
for (size_t i = 0; i < this->m_octaves; ++i) {
|
||||
total += this->m_basis (p) * scale;
|
||||
|
||||
p += T{1};
|
||||
p *= this->m_lacunarity;
|
||||
scale *= this->m_invGH;
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ namespace util { namespace noise { namespace fractal {
|
||||
|
||||
result += increment;
|
||||
|
||||
p += T{1};
|
||||
p *= this->m_lacunarity;
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,7 @@ namespace util { namespace noise { namespace fractal {
|
||||
weight = min (weight, T{1});
|
||||
|
||||
scale *= this->m_invGH;
|
||||
p += T{1};
|
||||
p *= this->m_lacunarity;
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,8 @@ namespace util { namespace noise { namespace fractal {
|
||||
result += signal * scale;
|
||||
|
||||
scale *= this->m_invGH;
|
||||
|
||||
p += T{1};
|
||||
p *= this->m_lacunarity;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user