diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-04-06 23:37:50 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-04-07 00:23:48 +0300 |
commit | 10f0e003a95a9d28be162605d7985c4d4620f6c0 (patch) | |
tree | 74fb6db571f27909a1a033fae5f34e057de5b7be /intern/cycles/render | |
parent | e05552f7c4ac27faa510048e8c010e4323acb569 (diff) |
Fix T74572: adaptive sampling not scaling AOVs correctly
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/film.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index baf02901123..f28c943ea6c 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -362,8 +362,10 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene) kfilm->light_pass_flag = 0; kfilm->pass_stride = 0; kfilm->use_light_pass = use_light_visibility; + kfilm->pass_aov_value_num = 0; + kfilm->pass_aov_color_num = 0; - bool have_cryptomatte = false, have_aov_color = false, have_aov_value = false; + bool have_cryptomatte = false; for (size_t i = 0; i < passes.size(); i++) { Pass &pass = passes[i]; @@ -498,16 +500,16 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene) kfilm->pass_sample_count = kfilm->pass_stride; break; case PASS_AOV_COLOR: - if (!have_aov_color) { + if (kfilm->pass_aov_value_num == 0) { kfilm->pass_aov_color = kfilm->pass_stride; - have_aov_color = true; } + kfilm->pass_aov_value_num++; break; case PASS_AOV_VALUE: - if (!have_aov_value) { + if (kfilm->pass_aov_color_num == 0) { kfilm->pass_aov_value = kfilm->pass_stride; - have_aov_value = true; } + kfilm->pass_aov_color_num++; break; default: assert(false); |