[Bf-blender-cvs] [3bf69b26ef8] master: Cycles Denoising: Skip feature pass writing for volume-only shaders

Lukas Stockner noreply at git.blender.org
Sun May 21 05:44:16 CEST 2017


Commit: 3bf69b26ef8cce649283d130cdaf4fe3de239415
Author: Lukas Stockner
Date:   Sun May 21 05:40:13 2017 +0200
Branches: master
https://developer.blender.org/rB3bf69b26ef8cce649283d130cdaf4fe3de239415

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.

===================================================================

M	intern/cycles/kernel/kernel_passes.h

===================================================================

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;




More information about the Bf-blender-cvs mailing list