diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-11-22 23:06:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-22 23:06:10 +0300 |
commit | 48c2b4012f788b25b3e1ac90f8626560a24987e6 (patch) | |
tree | f411139895f6861e0b84e891639233d928cbe508 | |
parent | 29681f186e1a6865da0b4936805df5a608b90ee9 (diff) | |
parent | e2b736aa406e3e87a839d2f96ac9a1718ec253e3 (diff) |
Merge branch 'blender-v3.0-release'
-rw-r--r-- | intern/cycles/kernel/closure/bsdf.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/film/accumulate.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/film/passes.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/integrator/path_state.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/aov.h | 3 |
5 files changed, 7 insertions, 6 deletions
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index 28c889f2841..f0ce45d1c2c 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -438,7 +438,7 @@ ccl_device_inline int bsdf_sample(KernelGlobals kg, if (label & LABEL_TRANSMIT) { float threshold_squared = kernel_data.background.transparent_roughness_squared_threshold; - if (threshold_squared >= 0.0f) { + if (threshold_squared >= 0.0f && !(label & LABEL_DIFFUSE)) { if (bsdf_get_specular_roughness_squared(sc) <= threshold_squared) { label |= LABEL_TRANSMIT_TRANSPARENT; } diff --git a/intern/cycles/kernel/film/accumulate.h b/intern/cycles/kernel/film/accumulate.h index 9ee0d27cc8c..fb52b1cd05f 100644 --- a/intern/cycles/kernel/film/accumulate.h +++ b/intern/cycles/kernel/film/accumulate.h @@ -502,7 +502,7 @@ ccl_device_inline void kernel_accum_light(KernelGlobals kg, /* Write shadow pass. */ if (kernel_data.film.pass_shadow != PASS_UNUSED && (path_flag & PATH_RAY_SHADOW_FOR_LIGHT) && - (path_flag & PATH_RAY_CAMERA)) { + (path_flag & PATH_RAY_TRANSPARENT_BACKGROUND)) { const float3 unshadowed_throughput = INTEGRATOR_STATE( state, shadow_path, unshadowed_throughput); const float3 shadowed_throughput = INTEGRATOR_STATE(state, shadow_path, throughput); diff --git a/intern/cycles/kernel/film/passes.h b/intern/cycles/kernel/film/passes.h index 77761709a78..269e3620388 100644 --- a/intern/cycles/kernel/film/passes.h +++ b/intern/cycles/kernel/film/passes.h @@ -177,7 +177,7 @@ ccl_device_inline void kernel_write_data_passes(KernelGlobals kg, #ifdef __PASSES__ const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag); - if (!(path_flag & PATH_RAY_CAMERA)) { + if (!(path_flag & PATH_RAY_TRANSPARENT_BACKGROUND)) { return; } diff --git a/intern/cycles/kernel/integrator/path_state.h b/intern/cycles/kernel/integrator/path_state.h index eac9ceeae70..e79497320af 100644 --- a/intern/cycles/kernel/integrator/path_state.h +++ b/intern/cycles/kernel/integrator/path_state.h @@ -122,7 +122,7 @@ ccl_device_inline void path_state_next(KernelGlobals kg, IntegratorState state, /* volume scatter */ flag |= PATH_RAY_VOLUME_SCATTER; flag &= ~PATH_RAY_TRANSPARENT_BACKGROUND; - if (bounce == 1) { + if (!(flag & PATH_RAY_ANY_PASS)) { flag |= PATH_RAY_VOLUME_PASS; } @@ -184,7 +184,7 @@ ccl_device_inline void path_state_next(KernelGlobals kg, IntegratorState state, } /* Render pass categories. */ - if (bounce == 1) { + if (!(flag & PATH_RAY_ANY_PASS) && !(flag & PATH_RAY_TRANSPARENT_BACKGROUND)) { flag |= PATH_RAY_SURFACE_PASS; } } diff --git a/intern/cycles/kernel/svm/aov.h b/intern/cycles/kernel/svm/aov.h index 21ee7af7639..0beaf0babc6 100644 --- a/intern/cycles/kernel/svm/aov.h +++ b/intern/cycles/kernel/svm/aov.h @@ -23,7 +23,8 @@ CCL_NAMESPACE_BEGIN ccl_device_inline bool svm_node_aov_check(const uint32_t path_flag, ccl_global float *render_buffer) { - bool is_primary = (path_flag & PATH_RAY_CAMERA) && (!(path_flag & PATH_RAY_SINGLE_PASS_DONE)); + bool is_primary = (path_flag & PATH_RAY_TRANSPARENT_BACKGROUND) && + (!(path_flag & PATH_RAY_SINGLE_PASS_DONE)); return ((render_buffer != NULL) && is_primary); } |