diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-01-13 02:09:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-01-13 12:40:40 +0300 |
commit | eaa4cdaa4230d69b470d229017bad27c03c9ef14 (patch) | |
tree | 376b12f661565507f4e416cb324ddb43ff51c903 /intern/cycles | |
parent | 29450a2af3dd1f3f52de82cfe689da22a6100e6d (diff) |
Fix T94758: wrong denoising albedo with BSSRDF retro reflection
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/film/passes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/kernel/film/passes.h b/intern/cycles/kernel/film/passes.h index 269e3620388..698eae29767 100644 --- a/intern/cycles/kernel/film/passes.h +++ b/intern/cycles/kernel/film/passes.h @@ -92,6 +92,14 @@ ccl_device_forceinline void kernel_write_denoising_features_surface( else if (sc->type == CLOSURE_BSDF_HAIR_PRINCIPLED_ID) { closure_albedo *= bsdf_principled_hair_albedo(sc); } + else if (sc->type == CLOSURE_BSDF_PRINCIPLED_DIFFUSE_ID) { + /* BSSRDF already accounts for weight, retro-reflection would double up. */ + ccl_private const PrincipledDiffuseBsdf *bsdf = (ccl_private const PrincipledDiffuseBsdf *) + sc; + if (bsdf->components == PRINCIPLED_DIFFUSE_RETRO_REFLECTION) { + continue; + } + } if (bsdf_get_specular_roughness_squared(sc) > sqr(0.075f)) { diffuse_albedo += closure_albedo; |