From c445960cdad168be3beede984940c10fc86ff694 Mon Sep 17 00:00:00 2001 From: Stefan Gustavson Date: Tue, 29 Jun 2021 11:04:55 +0200 Subject: [PATCH] New permutation (much improved randomness) --- src/cellular2x2.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cellular2x2.glsl b/src/cellular2x2.glsl index c563e14..4651af8 100644 --- a/src/cellular2x2.glsl +++ b/src/cellular2x2.glsl @@ -20,9 +20,9 @@ vec4 mod7(vec4 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 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.