diff options
author | Phil Gosch <phil@saphirestudio.at> | 2017-09-29 23:52:29 +0300 |
---|---|---|
committer | Phil Gosch <phil@saphirestudio.at> | 2017-09-29 23:52:29 +0300 |
commit | 2b1ec9c18fadf6b5cd71a7d4122776f5d4b8ac33 (patch) | |
tree | 01b477f0ea027ab5908f332f6102db6a1d381b76 /intern/cycles/kernel/split/kernel_branched.h | |
parent | 5cdd4388ffaad5ade916dba3c18e2bc679e19747 (diff) | |
parent | e3546a5097b1b30a3c694ce0f6b98c2f7e70510c (diff) |
Merge remote-tracking branch 'origin/master' into soc-2016-uv_toolssoc-2016-uv_tools
Diffstat (limited to 'intern/cycles/kernel/split/kernel_branched.h')
-rw-r--r-- | intern/cycles/kernel/split/kernel_branched.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/intern/cycles/kernel/split/kernel_branched.h b/intern/cycles/kernel/split/kernel_branched.h index e2762a85fc8..2313feac089 100644 --- a/intern/cycles/kernel/split/kernel_branched.h +++ b/intern/cycles/kernel/split/kernel_branched.h @@ -87,7 +87,6 @@ ccl_device_inline bool kernel_split_branched_indirect_start_shared(KernelGlobals PathRadiance *inactive_L = &kernel_split_state.path_radiance[inactive_ray]; path_radiance_init(inactive_L, kernel_data.film.use_light_pass); - inactive_L->direct_throughput = L->direct_throughput; path_radiance_copy_indirect(inactive_L, L); ray_state[inactive_ray] = RAY_REGENERATED; @@ -110,7 +109,6 @@ ccl_device_noinline bool kernel_split_branched_path_surface_indirect_light_iter( SplitBranchedState *branched_state = &kernel_split_state.branched_state[ray_index]; ShaderData *sd = saved_sd; - RNG rng = kernel_split_state.rng[ray_index]; PathRadiance *L = &kernel_split_state.path_radiance[ray_index]; float3 throughput = branched_state->throughput; ccl_global PathState *ps = &kernel_split_state.path_state[ray_index]; @@ -157,37 +155,38 @@ ccl_device_noinline bool kernel_split_branched_path_surface_indirect_light_iter( num_samples = ceil_to_int(num_samples_adjust*num_samples); float num_samples_inv = num_samples_adjust/num_samples; - RNG bsdf_rng = cmj_hash(rng, i); for(int j = branched_state->next_sample; j < num_samples; j++) { if(reset_path_state) { *ps = branched_state->path_state; } + ps->rng_hash = cmj_hash(branched_state->path_state.rng_hash, i); + ccl_global float3 *tp = &kernel_split_state.throughput[ray_index]; *tp = throughput; ccl_global Ray *bsdf_ray = &kernel_split_state.ray[ray_index]; if(!kernel_branched_path_surface_bounce(kg, - &bsdf_rng, sd, sc, j, num_samples, tp, ps, - L, + &L->state, bsdf_ray, sum_sample_weight)) { continue; } + ps->rng_hash = branched_state->path_state.rng_hash; + /* update state for next iteration */ branched_state->next_closure = i; branched_state->next_sample = j+1; - branched_state->num_samples = num_samples; /* start the indirect path */ *tp *= num_samples_inv; |