New permutation (much improved randomness)

This commit is contained in:
Stefan Gustavson 2021-06-29 11:05:23 +02:00 committed by GitHub
parent c445960cda
commit 00c69d4dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,13 +21,13 @@ vec4 mod7(vec4 x) {
}
// 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);
}
vec4 permute(vec4 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.