Fix pcg::lazy_perlin normalization
This commit is contained in:
parent
f574850621
commit
079157f201
1 changed files with 2 additions and 1 deletions
|
|
@ -53,7 +53,8 @@ namespace psemek::pcg
|
||||||
values[mask] = smootherstep(values[mask], values[mask | (1 << i)], t[i]);
|
values[mask] = smootherstep(values[mask], values[mask | (1 << i)], t[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0.5 * (1. + std::sqrt(2.) * values[0]);
|
static auto const max = std::sqrt(T(N) / T(4));
|
||||||
|
return 0.5 * (1. + values[0] / max);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue