diff options
Diffstat (limited to 'intern/cycles/kernel/kernel_random.h')
-rw-r--r-- | intern/cycles/kernel/kernel_random.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h index 13cf4df8b8c..df876e6f726 100644 --- a/intern/cycles/kernel/kernel_random.h +++ b/intern/cycles/kernel/kernel_random.h @@ -128,11 +128,15 @@ __device_inline void path_rng_init(KernelGlobals *kg, __global uint *rng_state, *rng = sobol_lookup(bits, frame, x, y, &px, &py); + *rng ^= kernel_data.integrator.seed; + *fx = size * (float)px * (1.0f/(float)0xFFFFFFFF) - x; *fy = size * (float)py * (1.0f/(float)0xFFFFFFFF) - y; #else *rng = rng_state[x + y*kernel_data.cam.width]; + *rng ^= kernel_data.integrator.seed; + *fx = path_rng(kg, rng, sample, PRNG_FILTER_U); *fy = path_rng(kg, rng, sample, PRNG_FILTER_V); #endif @@ -159,6 +163,8 @@ __device void path_rng_init(KernelGlobals *kg, __global uint *rng_state, int sam /* load state */ *rng = rng_state[x + y*kernel_data.cam.width]; + *rng ^= kernel_data.integrator.seed; + *fx = path_rng(kg, rng, sample, PRNG_FILTER_U); *fy = path_rng(kg, rng, sample, PRNG_FILTER_V); } |