diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-03-31 15:51:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-03-31 15:54:15 +0400 |
commit | c8862806bafba79f1022cc3d17d36b22916e3422 (patch) | |
tree | 1040f90696d268ebc1d4443432bec16448eea47d | |
parent | 277fb1a31fc4b0c9691b3bbab43fd1a970d3e575 (diff) |
Fix T39525: branched path + no lights + disabled use all lights option crash.
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 81f47db41a6..2764d0e0f19 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -954,8 +954,10 @@ ccl_device_noinline void kernel_branched_path_integrate_lighting(KernelGlobals * PathState *state, PathRadiance *L, ccl_global float *buffer) { #ifdef __EMISSION__ - bool all = kernel_data.integrator.sample_all_lights_direct; - kernel_branched_path_integrate_direct_lighting(kg, rng, sd, state, throughput, num_samples_adjust, L, all); + if(kernel_data.integrator.use_direct_light) { + bool all = kernel_data.integrator.sample_all_lights_direct; + kernel_branched_path_integrate_direct_lighting(kg, rng, sd, state, throughput, num_samples_adjust, L, all); + } #endif for(int i = 0; i< sd->num_closure; i++) { |