Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTautvydas Andrikys <esminis>2020-05-14 18:41:37 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-06-02 20:48:51 +0300
commitffb3365fb2063966ead370d8668a259a5525175f (patch)
treef0acceecf90a94a0c996753fbe7ec62c7be779c4 /intern/cycles/render/light.h
parent0465086223f16f650c6f64e7bcfac99612612c42 (diff)
Fix T63588: Cycles unnecessarily updates background importance sampling map
With modifications by Brecht to solve T77273, crash enabling portal lights.
Diffstat (limited to 'intern/cycles/render/light.h')
-rw-r--r--intern/cycles/render/light.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h
index 4f3048c1f32..d136e8f1a08 100644
--- a/intern/cycles/render/light.h
+++ b/intern/cycles/render/light.h
@@ -88,6 +88,9 @@ class LightManager {
bool use_light_visibility;
bool need_update;
+ /* Need to update background (including multiple importance map) */
+ bool need_update_background;
+
LightManager();
~LightManager();
@@ -97,7 +100,7 @@ class LightManager {
void remove_ies(int slot);
void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress);
- void device_free(Device *device, DeviceScene *dscene);
+ void device_free(Device *device, DeviceScene *dscene, const bool free_background = true);
void tag_update(Scene *scene);
@@ -109,7 +112,7 @@ class LightManager {
* which doesn't contribute to the scene or which is only used for MIS
* and scene doesn't need MIS.
*/
- void disable_ineffective_light(Scene *scene);
+ void test_enabled_lights(Scene *scene);
void device_update_points(Device *device, DeviceScene *dscene, Scene *scene);
void device_update_distribution(Device *device,
@@ -133,6 +136,9 @@ class LightManager {
vector<IESSlot *> ies_slots;
thread_mutex ies_mutex;
+
+ bool last_background_enabled;
+ int last_background_resolution;
};
CCL_NAMESPACE_END