diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2017-05-21 06:40:13 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2017-05-21 06:40:13 +0300 |
commit | 3bf69b26ef8cce649283d130cdaf4fe3de239415 (patch) | |
tree | c406e8e95fc220c0346a870335714b12db3c07f8 | |
parent | 96769f3b199f52ada7e4f7cd1f53d4e4a8f906ef (diff) |
Cycles Denoising: Skip feature pass writing for volume-only shaders
Volume shaders without anything connected to the surface output are treated
as if they had a transparent BSDF as the surface shader in Cycles, so the
denoiser should skip feature pass writing for them just as it does with an
actual transparent BSDF.
-rw-r--r-- | intern/cycles/kernel/kernel_passes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index c5206940493..9d52834ffcc 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -152,6 +152,11 @@ ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg, L->denoising_depth += ensure_finite(state->denoising_feature_weight * sd->ray_length); + /* Skip implicitly transparent surfaces. */ + if(sd->flag & SD_HAS_ONLY_VOLUME) { + return; + } + float3 normal = make_float3(0.0f, 0.0f, 0.0f); float3 albedo = make_float3(0.0f, 0.0f, 0.0f); float sum_weight = 0.0f, sum_nonspecular_weight = 0.0f; |