mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +00:00
fix BrownianMotionSampler lerp usage
This commit is contained in:
parent
da4ab8b71c
commit
84cd96ecf7
@ -24,7 +24,7 @@ public class BrownianMotionSampler extends FractalNoiseFunction {
|
|||||||
for(int i = 0; i < octaves; i++) {
|
for(int i = 0; i < octaves; i++) {
|
||||||
double noise = input.noise(seed++, x, y);
|
double noise = input.noise(seed++, x, y);
|
||||||
sum += noise * amp;
|
sum += noise * amp;
|
||||||
amp *= MathUtil.lerp(1.0, Math.min(noise + 1, 2) * 0.5, weightedStrength);
|
amp *= MathUtil.lerp(weightedStrength, 1.0, Math.min(noise + 1, 2) * 0.5);
|
||||||
|
|
||||||
x *= lacunarity;
|
x *= lacunarity;
|
||||||
y *= lacunarity;
|
y *= lacunarity;
|
||||||
@ -42,7 +42,7 @@ public class BrownianMotionSampler extends FractalNoiseFunction {
|
|||||||
for(int i = 0; i < octaves; i++) {
|
for(int i = 0; i < octaves; i++) {
|
||||||
double noise = input.noise(seed++, x, y, z);
|
double noise = input.noise(seed++, x, y, z);
|
||||||
sum += noise * amp;
|
sum += noise * amp;
|
||||||
amp *= MathUtil.lerp(1.0, (noise + 1) * 0.5, weightedStrength);
|
amp *= MathUtil.lerp(weightedStrength, 1.0, (noise + 1) * 0.5);
|
||||||
|
|
||||||
x *= lacunarity;
|
x *= lacunarity;
|
||||||
y *= lacunarity;
|
y *= lacunarity;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user