Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-08-05 16:12:43 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-05 17:32:13 +0300
commit43a124bc1c4a2e096a6a81224fc318ac8f9180a4 (patch)
treef2a7eae00e49a65d86c42a52c3b843bb85d3b03c /intern/cycles/kernel/integrator/shade_surface.h
parentfa514564b0c3ec4769c814c2bee587ce9e386571 (diff)
Fix T99179: holdout does not affect transparency without transparent background
This was by design, but maybe not so useful in practice. It's always possible to set alpha to 1 in compositing if needed.
Diffstat (limited to 'intern/cycles/kernel/integrator/shade_surface.h')
-rw-r--r--intern/cycles/kernel/integrator/shade_surface.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h
index 1514b3956ad..70b20a93b6a 100644
--- a/intern/cycles/kernel/integrator/shade_surface.h
+++ b/intern/cycles/kernel/integrator/shade_surface.h
@@ -43,11 +43,9 @@ ccl_device_forceinline bool integrate_surface_holdout(KernelGlobals kg,
if (((sd->flag & SD_HOLDOUT) || (sd->object_flag & SD_OBJECT_HOLDOUT_MASK)) &&
(path_flag & PATH_RAY_TRANSPARENT_BACKGROUND)) {
const float3 holdout_weight = shader_holdout_apply(kg, sd);
- if (kernel_data.background.transparent) {
- const float3 throughput = INTEGRATOR_STATE(state, path, throughput);
- const float transparent = average(holdout_weight * throughput);
- kernel_accum_holdout(kg, state, path_flag, transparent, render_buffer);
- }
+ const float3 throughput = INTEGRATOR_STATE(state, path, throughput);
+ const float transparent = average(holdout_weight * throughput);
+ kernel_accum_holdout(kg, state, path_flag, transparent, render_buffer);
if (isequal(holdout_weight, one_float3())) {
return false;
}