diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-11-12 18:43:43 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-12 22:03:46 +0300 |
commit | b4d9b8b7f8d69165bec0c0006cbc1cd03e769081 (patch) | |
tree | 1aee76caaac483c2b103a8a1cb092965c4458f03 /intern/cycles/scene/film.cpp | |
parent | ef0b8d6306e5e1cddf1d7a2087e5589adcf74172 (diff) |
Fix T91893, T92455: wrong transmission pass with hair and multiscatter glass
We need to increase GPU memory usage a bit. Unfortunately we can't get away
with writing either reflection or transmission passes because these BSDFs may
scatter in either direction but still must be in a fixed reflection or
transmission category to match up with the color passes.
Diffstat (limited to 'intern/cycles/scene/film.cpp')
-rw-r--r-- | intern/cycles/scene/film.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/intern/cycles/scene/film.cpp b/intern/cycles/scene/film.cpp index 591f309384e..cdaaea6be2f 100644 --- a/intern/cycles/scene/film.cpp +++ b/intern/cycles/scene/film.cpp @@ -187,8 +187,6 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene) kfilm->pass_transmission_indirect = PASS_UNUSED; kfilm->pass_volume_direct = PASS_UNUSED; kfilm->pass_volume_indirect = PASS_UNUSED; - kfilm->pass_volume_direct = PASS_UNUSED; - kfilm->pass_volume_indirect = PASS_UNUSED; kfilm->pass_shadow = PASS_UNUSED; /* Mark passes as unused so that the kernel knows the pass is inaccessible. */ @@ -673,13 +671,12 @@ uint Film::get_kernel_features(const Scene *scene) const kernel_features |= KERNEL_FEATURE_DENOISING; } - if (pass_type != PASS_NONE && pass_type != PASS_COMBINED && - pass_type <= PASS_CATEGORY_LIGHT_END) { + if (pass_type >= PASS_DIFFUSE && pass_type <= PASS_VOLUME_INDIRECT) { kernel_features |= KERNEL_FEATURE_LIGHT_PASSES; + } - if (pass_type == PASS_SHADOW) { - kernel_features |= KERNEL_FEATURE_SHADOW_PASS; - } + if (pass_type == PASS_SHADOW) { + kernel_features |= KERNEL_FEATURE_SHADOW_PASS; } if (pass_type == PASS_AO) { |