New permutation (much improved randomness)
This commit is contained in:
parent
00c69d4dc8
commit
074f374fcb
@ -16,9 +16,9 @@ vec3 mod7(vec3 x) {
|
||||
return x - floor(x * (1.0 / 7.0)) * 7.0;
|
||||
}
|
||||
|
||||
// Permutation polynomial: (34x^2 + x) mod 289
|
||||
// Permutation polynomial: (34x^2 + 6x) mod 289
|
||||
vec3 permute(vec3 x) {
|
||||
return mod289((34.0 * x + 1.0) * x);
|
||||
return mod289((34.0 * x + 6.0) * x);
|
||||
}
|
||||
|
||||
// Cellular noise, returning F1 and F2 in a vec2.
|
||||
|
Loading…
x
Reference in New Issue
Block a user