diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_path_branched.h | 1 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_path_state.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/split/kernel_subsurface_scatter.h | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_path_branched.h b/intern/cycles/kernel/kernel_path_branched.h index fe2a7d179a4..70d0292c5a5 100644 --- a/intern/cycles/kernel/kernel_path_branched.h +++ b/intern/cycles/kernel/kernel_path_branched.h @@ -372,6 +372,7 @@ ccl_device void kernel_branched_path_subsurface_scatter(KernelGlobals *kg, PathState hit_state = *state; path_state_branch(&hit_state, j, num_samples); + hit_state.rng_offset += PRNG_BOUNCE_NUM; #ifdef __VOLUME__ if(need_update_volume_stack) { diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index 2ae866bb051..a16c20cbee6 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -231,8 +231,6 @@ ccl_device_inline void path_state_branch(ccl_addr_space PathState *state, int branch, int num_branches) { - state->rng_offset += PRNG_BOUNCE_NUM; - if(num_branches > 1) { /* Path is splitting into a branch, adjust so that each branch * still gets a unique sample from the same sequence. */ diff --git a/intern/cycles/kernel/split/kernel_subsurface_scatter.h b/intern/cycles/kernel/split/kernel_subsurface_scatter.h index 38dd1dc5654..993e8d4d477 100644 --- a/intern/cycles/kernel/split/kernel_subsurface_scatter.h +++ b/intern/cycles/kernel/split/kernel_subsurface_scatter.h @@ -117,6 +117,7 @@ ccl_device_noinline bool kernel_split_branched_path_subsurface_indirect_light_it *hit_state = branched_state->path_state; path_state_branch(hit_state, j, num_samples); + hit_state->rng_offset += PRNG_BOUNCE_NUM; #ifdef __VOLUME__ if(need_update_volume_stack) { |