Fix T93418: Cycles shadow terminator Geometry Offset artifacts with translucency
Differential Revision: https://developer.blender.org/D13468
This commit is contained in:
committed by
Brecht Van Lommel
parent
484714992c
commit
a92805bf24
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user