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.
This commit is contained in:
Lukas Stockner 2017-05-21 05:40:13 +02:00
parent 96769f3b19
commit 3bf69b26ef
1 changed files with 5 additions and 0 deletions

View File

@ -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;