[Bf-blender-cvs] [4c8740a4521] blender-v3.0-release: Fix T93418: Cycles shadow terminator Geometry Offset artifacts with translucency
Mikhail Matrosov
noreply at git.blender.org
Tue Jan 11 10:38:39 CET 2022
Commit: 4c8740a45217fc9cc5c4f668695cdf6e7d446ec1
Author: Mikhail Matrosov
Date: Tue Dec 7 18:48:41 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rB4c8740a45217fc9cc5c4f668695cdf6e7d446ec1
Fix T93418: Cycles shadow terminator Geometry Offset artifacts with translucency
Differential Revision: https://developer.blender.org/D13468
===================================================================
M intern/cycles/kernel/light/sample.h
===================================================================
diff --git a/intern/cycles/kernel/light/sample.h b/intern/cycles/kernel/light/sample.h
index 6b643a95250..5b2685e754e 100644
--- a/intern/cycles/kernel/light/sample.h
+++ b/intern/cycles/kernel/light/sample.h
@@ -199,6 +199,9 @@ ccl_device_inline float3 shadow_ray_offset(KernelGlobals kg,
if (offset_cutoff > 0.0f) {
float NgL = dot(Ng, L);
float offset_amount = 0.0f;
+ if (NL < 0) {
+ NL = -NL;
+ }
if (NL < offset_cutoff) {
offset_amount = clamp(2.0f - (NgL + NL) / offset_cutoff, 0.0f, 1.0f);
}
More information about the Bf-blender-cvs
mailing list