diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-12 18:29:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-12 18:29:52 +0400 |
commit | fc42a6185ddeb6a24ec92287dfa7b89beb059716 (patch) | |
tree | cdd34b01d77f6c104ed38c30719426c11c01a96e /intern/cycles/kernel/kernel_random.h | |
parent | 817b6cb9a8990483a2bfce7a11e690c829e75ddc (diff) |
Cycles:
* Fix object scaling update issue with interactive rendering + static BVH.
* Fix negative scaling issue with static BVH.
* Fix #29217: excessive fireflies in first sample.
Diffstat (limited to 'intern/cycles/kernel/kernel_random.h')
-rw-r--r-- | intern/cycles/kernel/kernel_random.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h index df876e6f726..ba97ab3e3b6 100644 --- a/intern/cycles/kernel/kernel_random.h +++ b/intern/cycles/kernel/kernel_random.h @@ -22,6 +22,11 @@ typedef uint RNG; #ifdef __SOBOL__ +/* skip initial numbers that are not as well distributed, especially the + first sequence is just 0 everywhere, which can be problematic for e.g. + path termination */ +#define SOBOL_SKIP 64 + /* High Dimensional Sobol */ /* van der corput radical inverse */ @@ -103,7 +108,7 @@ __device_inline float path_rng(KernelGlobals *kg, RNG *rng, int sample, int dime return r; #else /* compute sobol sequence value using direction vectors */ - uint result = sobol_dimension(kg, sample, dimension); + uint result = sobol_dimension(kg, sample + SOBOL_SKIP, dimension); float r = (float)result * (1.0f/(float)0xFFFFFFFF); /* Cranly-Patterson rotation using rng seed */ |