[Bf-blender-cvs] [f17ca53cdd2] master: Fix wrong update with shadow catcher and transparent film

Sergey Sharybin noreply at git.blender.org
Tue Sep 28 17:15:59 CEST 2021


Commit: f17ca53cdd2f3e3f4ccfcae404deebb02ead158d
Author: Sergey Sharybin
Date:   Tue Sep 28 14:37:59 2021 +0200
Branches: master
https://developer.blender.org/rBf17ca53cdd2f3e3f4ccfcae404deebb02ead158d

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

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

M	intern/cycles/render/film.cpp

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

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



More information about the Bf-blender-cvs mailing list