diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-01-20 22:55:43 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-01-20 22:55:43 +0300 |
commit | 22a8e934e40ab7a802d0fc988b4097c09c2bc075 (patch) | |
tree | 965bcbc7f52d936db088b7dcbcd5c23fbd7ea398 /intern/cycles/kernel | |
parent | e1ae95f6b2a3106c008e94b11cda9ba3e6d59ae3 (diff) |
Fix T94698: artifacts in light passes with mixed volumes and surfaces
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/integrator/shade_surface.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/integrator/shade_volume.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h index 3d5b65458c7..9f6077e5d66 100644 --- a/intern/cycles/kernel/integrator/shade_surface.h +++ b/intern/cycles/kernel/integrator/shade_surface.h @@ -188,7 +188,7 @@ ccl_device_forceinline void integrate_surface_direct_light(KernelGlobals kg, const uint16_t transparent_bounce = INTEGRATOR_STATE(state, path, transparent_bounce); uint32_t shadow_flag = INTEGRATOR_STATE(state, path, flag); shadow_flag |= (is_light) ? PATH_RAY_SHADOW_FOR_LIGHT : 0; - shadow_flag |= PATH_RAY_SURFACE_PASS; + shadow_flag |= (shadow_flag & PATH_RAY_ANY_PASS) ? 0 : PATH_RAY_SURFACE_PASS; const float3 throughput = INTEGRATOR_STATE(state, path, throughput) * bsdf_eval_sum(&bsdf_eval); if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) { diff --git a/intern/cycles/kernel/integrator/shade_volume.h b/intern/cycles/kernel/integrator/shade_volume.h index 712c22357b8..00fa256d894 100644 --- a/intern/cycles/kernel/integrator/shade_volume.h +++ b/intern/cycles/kernel/integrator/shade_volume.h @@ -797,7 +797,7 @@ ccl_device_forceinline void integrate_volume_direct_light( const uint16_t transparent_bounce = INTEGRATOR_STATE(state, path, transparent_bounce); uint32_t shadow_flag = INTEGRATOR_STATE(state, path, flag); shadow_flag |= (is_light) ? PATH_RAY_SHADOW_FOR_LIGHT : 0; - shadow_flag |= PATH_RAY_VOLUME_PASS; + shadow_flag |= (shadow_flag & PATH_RAY_ANY_PASS) ? 0 : PATH_RAY_VOLUME_PASS; const float3 throughput_phase = throughput * bsdf_eval_sum(&phase_eval); if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) { |