Code refactor: remove unnecessary RNG offset in branched path code.
This is only needed for SSS which bounces to a different shading point.
This commit is contained in:
@@ -372,6 +372,7 @@ ccl_device void kernel_branched_path_subsurface_scatter(KernelGlobals *kg,
|
|||||||
PathState hit_state = *state;
|
PathState hit_state = *state;
|
||||||
|
|
||||||
path_state_branch(&hit_state, j, num_samples);
|
path_state_branch(&hit_state, j, num_samples);
|
||||||
|
hit_state.rng_offset += PRNG_BOUNCE_NUM;
|
||||||
|
|
||||||
#ifdef __VOLUME__
|
#ifdef __VOLUME__
|
||||||
if(need_update_volume_stack) {
|
if(need_update_volume_stack) {
|
||||||
|
@@ -231,8 +231,6 @@ ccl_device_inline void path_state_branch(ccl_addr_space PathState *state,
|
|||||||
int branch,
|
int branch,
|
||||||
int num_branches)
|
int num_branches)
|
||||||
{
|
{
|
||||||
state->rng_offset += PRNG_BOUNCE_NUM;
|
|
||||||
|
|
||||||
if(num_branches > 1) {
|
if(num_branches > 1) {
|
||||||
/* Path is splitting into a branch, adjust so that each branch
|
/* Path is splitting into a branch, adjust so that each branch
|
||||||
* still gets a unique sample from the same sequence. */
|
* still gets a unique sample from the same sequence. */
|
||||||
|
@@ -117,6 +117,7 @@ ccl_device_noinline bool kernel_split_branched_path_subsurface_indirect_light_it
|
|||||||
*hit_state = branched_state->path_state;
|
*hit_state = branched_state->path_state;
|
||||||
|
|
||||||
path_state_branch(hit_state, j, num_samples);
|
path_state_branch(hit_state, j, num_samples);
|
||||||
|
hit_state->rng_offset += PRNG_BOUNCE_NUM;
|
||||||
|
|
||||||
#ifdef __VOLUME__
|
#ifdef __VOLUME__
|
||||||
if(need_update_volume_stack) {
|
if(need_update_volume_stack) {
|
||||||
|
Reference in New Issue
Block a user