Fix T41873: Different 'seed' values do not yield different noise patterns when using...
authorDalai Felinto <dfelinto@gmail.com>
Tue, 11 Nov 2014 12:52:58 +0000 (10:52 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Tue, 11 Nov 2014 12:53:01 +0000 (10:53 -0200)
As per instructions by Brecht Van Lommel.

intern/cycles/kernel/kernel_bake.h

index a1ec080e3d3ba6897120a534dd306de25cb20cf0..96be065f5d89d9e3cfb6604414f2f0f261198924 100644 (file)
@@ -198,10 +198,10 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input,
        int num_samples = kernel_data.integrator.aa_samples;
 
        /* random number generator */
        int num_samples = kernel_data.integrator.aa_samples;
 
        /* random number generator */
-       RNG rng = cmj_hash(offset + i, 0);
+       RNG rng = cmj_hash(offset + i, kernel_data.integrator.seed);
 
 #if 0
 
 #if 0
-       uint rng_state = cmj_hash(i, 0);
+       uint rng_state = cmj_hash(i, kernel_data.integrator.seed);
        float filter_x, filter_y;
        path_rng_init(kg, &rng_state, sample, num_samples, &rng, 0, 0, &filter_x, &filter_y);
 
        float filter_x, filter_y;
        path_rng_init(kg, &rng_state, sample, num_samples, &rng, 0, 0, &filter_x, &filter_y);