diff options
Diffstat (limited to 'intern/cycles/kernel/integrator/shader_eval.h')
-rw-r--r-- | intern/cycles/kernel/integrator/shader_eval.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/kernel/integrator/shader_eval.h b/intern/cycles/kernel/integrator/shader_eval.h index ce76f7a3a90..3066fb661a1 100644 --- a/intern/cycles/kernel/integrator/shader_eval.h +++ b/intern/cycles/kernel/integrator/shader_eval.h @@ -157,7 +157,11 @@ ccl_device_inline void shader_prepare_surface_closures(KernelGlobals kg, * * Blurring of bsdf after bounces, for rays that have a small likelihood * of following this particular path (diffuse, rough glossy) */ - if (kernel_data.integrator.filter_glossy != FLT_MAX) { + if (kernel_data.integrator.filter_glossy != FLT_MAX +#ifdef __MNEE__ + && !(INTEGRATOR_STATE(state, path, mnee) & PATH_MNEE_VALID) +#endif + ) { float blur_pdf = kernel_data.integrator.filter_glossy * INTEGRATOR_STATE(state, path, min_ray_pdf); @@ -605,7 +609,8 @@ ccl_device void shader_eval_surface(KernelGlobals kg, ConstIntegratorGenericState state, ccl_private ShaderData *ccl_restrict sd, ccl_global float *ccl_restrict buffer, - uint32_t path_flag) + uint32_t path_flag, + bool use_caustics_storage = false) { /* If path is being terminated, we are tracing a shadow ray or evaluating * emission, then we don't need to store closures. The emission and shadow @@ -615,7 +620,7 @@ ccl_device void shader_eval_surface(KernelGlobals kg, max_closures = 0; } else { - max_closures = kernel_data.max_closures; + max_closures = use_caustics_storage ? CAUSTICS_MAX_CLOSURE : kernel_data.max_closures; } sd->num_closure = 0; |