Fixed HybridMultiFractalXD
Former-commit-id: eb44374145b7c43012ae70de7a9224154d1a2985
This commit is contained in:
parent
3e916c91f0
commit
3616a126b8
|
|
@ -51,7 +51,7 @@ float NzHybridMultiFractal3D::GetValue(float x, float y, float z, float resoluti
|
||||||
resolution *= m_lacunarity;
|
resolution *= m_lacunarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_remainder = std::floor(m_octaves);
|
m_remainder = m_octaves - static_cast<int>(m_octaves);
|
||||||
if (m_remainder > 0.f)
|
if (m_remainder > 0.f)
|
||||||
m_value += m_remainder * m_source->GetValue(x,y,z,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];
|
m_value += m_remainder * m_source->GetValue(x,y,z,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ float NzHybridMultiFractal4D::GetValue(float x, float y, float z, float w, float
|
||||||
resolution *= m_lacunarity;
|
resolution *= m_lacunarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_remainder = std::floor(m_octaves);
|
m_remainder = m_octaves - static_cast<int>(m_octaves);
|
||||||
if (m_remainder > 0.f)
|
if (m_remainder > 0.f)
|
||||||
m_value += m_remainder * m_source->GetValue(x,y,z,w,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];
|
m_value += m_remainder * m_source->GetValue(x,y,z,w,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ float NzHybridMultiFractal2D::GetValue(float x, float y, float resolution)
|
||||||
resolution *= m_lacunarity;
|
resolution *= m_lacunarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_remainder = std::floor(m_octaves);
|
m_remainder = m_octaves - static_cast<int>(m_octaves);
|
||||||
if (m_remainder > 0.f)
|
if (m_remainder > 0.f)
|
||||||
m_value += m_remainder * m_source->GetValue(x,y,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];
|
m_value += m_remainder * m_source->GetValue(x,y,resolution) * m_exponent_array[static_cast<int>(m_octaves-1)];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue