From f17ca53cdd2f3e3f4ccfcae404deebb02ead158d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 28 Sep 2021 14:37:59 +0200 Subject: [PATCH] Fix wrong update with shadow catcher and transparent film This change fixes an issue when scene has a shadow catcher and film is configured to be transparent. Starting viewport render and making the background non-transparent will cause bad memory access (wrong render and possibly crash). Film passes depends on transparency of background, so check for this. Demo file: F10650585 Differential Revision: https://developer.blender.org/D12666 --- intern/cycles/render/film.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index 8e14b338bd3..ad3336ca089 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -434,7 +434,8 @@ void Film::update_passes(Scene *scene, bool add_sample_count_pass) const ObjectManager *object_manager = scene->object_manager; Integrator *integrator = scene->integrator; - if (!is_modified() && !object_manager->need_update() && !integrator->is_modified()) { + if (!is_modified() && !object_manager->need_update() && !integrator->is_modified() && + !background->is_modified()) { return; }