diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-10-18 19:25:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-18 20:02:10 +0300 |
commit | a9cb33081506f14ffb693e3b82742a940b6c80b2 (patch) | |
tree | eebf54a3072307af581e1964f153d3279559617a /intern/cycles/kernel/integrator | |
parent | 2430f752797b83cd43892f656f5297fd6e0bb619 (diff) |
Cleanup: minor refactoring in preparation of main and shadow path decoupling
Ref D12889
Diffstat (limited to 'intern/cycles/kernel/integrator')
-rw-r--r-- | intern/cycles/kernel/integrator/integrator_shade_surface.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/kernel/integrator/integrator_shade_surface.h b/intern/cycles/kernel/integrator/integrator_shade_surface.h index bbf613a669e..08580645984 100644 --- a/intern/cycles/kernel/integrator/integrator_shade_surface.h +++ b/intern/cycles/kernel/integrator/integrator_shade_surface.h @@ -56,7 +56,7 @@ ccl_device_forceinline bool integrate_surface_holdout(KernelGlobals kg, if (kernel_data.background.transparent) { const float3 throughput = INTEGRATOR_STATE(state, path, throughput); const float transparent = average(holdout_weight * throughput); - kernel_accum_transparent(kg, state, path_flag, transparent, render_buffer); + kernel_accum_holdout(kg, state, path_flag, transparent, render_buffer); } if (isequal_float3(holdout_weight, one_float3())) { return false; @@ -385,6 +385,14 @@ ccl_device bool integrate_surface(KernelGlobals kg, /* Evaluate shader. */ PROFILING_EVENT(PROFILING_SHADE_SURFACE_EVAL); shader_eval_surface<node_feature_mask>(kg, state, &sd, render_buffer, path_flag); + + /* Initialize additional RNG for BSDFs. */ + if (sd.flag & SD_BSDF_NEEDS_LCG) { + sd.lcg_state = lcg_state_init(INTEGRATOR_STATE(state, path, rng_hash), + INTEGRATOR_STATE(state, path, rng_offset), + INTEGRATOR_STATE(state, path, sample), + 0xb4bc3953); + } } #ifdef __SUBSURFACE__ |