[Bf-blender-cvs] [a24f95a5a38] cycles-x: Fix shadow approximation for combined pass in Cycles X
Sergey Sharybin
noreply at git.blender.org
Wed May 12 18:16:16 CEST 2021
Commit: a24f95a5a38fcb8b8a263eb29364fb73c368bf88
Author: Sergey Sharybin
Date: Wed May 12 18:14:52 2021 +0200
Branches: cycles-x
https://developer.blender.org/rBa24f95a5a38fcb8b8a263eb29364fb73c368bf88
Fix shadow approximation for combined pass in Cycles X
No need to take alpha into account when averaging: it does not contain
light information.
Was causing non-black shadow on scene without lights.
===================================================================
M intern/cycles/render/pass_accessor.cpp
===================================================================
diff --git a/intern/cycles/render/pass_accessor.cpp b/intern/cycles/render/pass_accessor.cpp
index 56818165998..3fe2db19225 100644
--- a/intern/cycles/render/pass_accessor.cpp
+++ b/intern/cycles/render/pass_accessor.cpp
@@ -162,7 +162,7 @@ static float4 shadow_catcher_calc_matte_with_shadow(const float scale,
return make_float4(color_matte[0],
color_matte[1],
color_matte[2],
- (1.0f - alpha) * (1.0f - average(shadow_catcher)) + alpha);
+ (1.0f - alpha) * (1.0f - average(float4_to_float3(shadow_catcher))) + alpha);
}
PassAccessor::PassAccessor(const vector<Pass> &passes,
More information about the Bf-blender-cvs
mailing list