[gegl] perlin: set random seed when initializing perlin noise



commit 27cedc5d0fcec62b9e0ef553867e48b410951c59
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Mar 11 20:36:13 2017 +0100

    perlin: set random seed when initializing perlin noise
    
    Fixing Bug 779900 - perlin noise is non-deterministic it doesn't use a fixed
    random seed

 operations/common/perlin/perlin.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/perlin/perlin.c b/operations/common/perlin/perlin.c
index b879eca..4e13cb3 100644
--- a/operations/common/perlin/perlin.c
+++ b/operations/common/perlin/perlin.c
@@ -166,6 +166,8 @@ perlin_init (void)
 {
   int       i, j, k;
 
+  g_random_set_seed (1234567890);
+
   for (i = 0; i < B; i++)
     {
       p[i] = i;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]