diff options
author | Mikhail Matrosov <ktdfly> | 2021-12-07 20:48:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-07 21:01:39 +0300 |
commit | a92805bf24f52e1764a5f930bbe9e4e8fcc7e24d (patch) | |
tree | 6770f8f15eae49f89d394e88b0aa5d5879f3b09e /intern/cycles/kernel | |
parent | 484714992c879400fbef380dfe77de6b1c875e03 (diff) |
Fix T93418: Cycles shadow terminator Geometry Offset artifacts with translucency
Differential Revision: https://developer.blender.org/D13468
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/light/sample.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/kernel/light/sample.h b/intern/cycles/kernel/light/sample.h index ff5d43ed8cd..83f6d733d3a 100644 --- a/intern/cycles/kernel/light/sample.h +++ b/intern/cycles/kernel/light/sample.h @@ -200,6 +200,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); } |