diff options
author | Mikhail Matrosov <ktdfly> | 2021-08-23 16:13:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-08-23 16:47:34 +0300 |
commit | cd118c5581f482afc8554ff88b5b6f3b552b1682 (patch) | |
tree | be8ff8d444c9cea2836d472d865d019a06241b6d /intern/cycles/kernel | |
parent | 27f138f4c819d6416adb5fafc24d3e447969c467 (diff) |
Fix T90423: black pixels after shadow terminator geometry offset
Solves an error in the principled diffuse BSDF, where it was not correctly
rejecting directions outside the hemisphere.
Differential Revision: https://developer.blender.org/D12283
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_principled_diffuse.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h index 43646aaeb5b..d5d012068ff 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h +++ b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h @@ -36,10 +36,10 @@ static_assert(sizeof(ShaderClosure) >= sizeof(PrincipledDiffuseBsdf), ccl_device float3 calculate_principled_diffuse_brdf( const PrincipledDiffuseBsdf *bsdf, float3 N, float3 V, float3 L, float3 H, float *pdf) { - float NdotL = max(dot(N, L), 0.0f); - float NdotV = max(dot(N, V), 0.0f); + float NdotL = dot(N, L); + float NdotV = dot(N, V); - if (NdotL < 0 || NdotV < 0) { + if (NdotL <= 0 || NdotV <= 0) { *pdf = 0.0f; return make_float3(0.0f, 0.0f, 0.0f); } |