diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2020-01-21 06:45:51 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2020-02-06 05:37:48 +0300 |
commit | dc1db0791ec3b2d52e6734054a001814cd6998ee (patch) | |
tree | b40ba289e33b2a7f11d1d6bada9623b36bdf0886 /intern/cycles/kernel/kernel_accumulate.h | |
parent | 8c353931afe1ac8969bcf7cdadc056f322cb2af8 (diff) |
Cycles: Track specular throughput to account for reflection color in denoising albedo pass
To determine the albedo pass, Cycles currently follows the path until a predominantly
diffuse-ish material is hit and then takes the albedo there.
This works fine for normal mirrors, but as it completely ignores the color of the bounces
before that diffuse-ish material, it also means that any textures that are applied to the
specular-ish BSDFs won't affect the albedo pass at all.
Therefore, this patch changes that behaviour so that Cycles also keeps track of the
throughput of all specular-ish closures along the path so far and includes that in
the albedo pass.
This fixes part of the issue described in T73043. However, since it has an effect on the
albedo pass in most scenes, it could cause cause regressions, which is why I'm uploading
it as a patch instead of just committing as a fix.
Differential Revision: https://developer.blender.org/D6640
Diffstat (limited to 'intern/cycles/kernel/kernel_accumulate.h')
-rw-r--r-- | intern/cycles/kernel/kernel_accumulate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h index 606c288649a..9ea75d54c5d 100644 --- a/intern/cycles/kernel/kernel_accumulate.h +++ b/intern/cycles/kernel/kernel_accumulate.h @@ -528,7 +528,8 @@ ccl_device_inline void path_radiance_accum_background(KernelGlobals *kg, } #ifdef __DENOISING_FEATURES__ - L->denoising_albedo += state->denoising_feature_weight * value; + L->denoising_albedo += state->denoising_feature_weight * state->denoising_feature_throughput * + value; #endif /* __DENOISING_FEATURES__ */ } |