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
path: root/intern
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2019-11-04 20:10:56 +0300
committerPatrick Mours <pmours@nvidia.com>2019-11-04 20:10:56 +0300
commit4b337a86f1dc230d6eb1720c8896b6cca26a2e72 (patch)
tree9ca6d45df7d73ea4ca7d2f47cce9dab61f4fc46a /intern
parentece4515fc8aadfcb7d18079e40862df38dda44cb (diff)
parentb45828ebe9c6e729c5d65bb23f913088f3f8672c (diff)
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/blender_object.cpp3
-rw-r--r--intern/cycles/render/light.cpp12
2 files changed, 8 insertions, 7 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 5520cfd5ecf..6981412bb88 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -269,6 +269,9 @@ void BlenderSync::sync_background_light(BL::SpaceView3D &b_v3d, bool use_portal)
light->use_mis = sample_as_light;
light->max_bounces = get_int(cworld, "max_bounces");
+ /* force enable light again when world is resynced */
+ light->is_enabled = true;
+
int samples = get_int(cworld, "samples");
if (get_boolean(cscene, "use_square_samples"))
light->samples = samples * samples;
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 8c7a21da561..dc3f7c8f8ac 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -221,13 +221,11 @@ void LightManager::disable_ineffective_light(Scene *scene)
*/
Shader *shader = (scene->background->shader) ? scene->background->shader :
scene->default_background;
- bool disable_mis = !(has_portal || shader->has_surface_spatial_varying);
- if (disable_mis) {
- VLOG(1) << "Background MIS has been disabled.\n";
- foreach (Light *light, scene->lights) {
- if (light->type == LIGHT_BACKGROUND) {
- light->is_enabled = false;
- }
+ const bool disable_mis = !(has_portal || shader->has_surface_spatial_varying);
+ VLOG_IF(1, disable_mis) << "Background MIS has been disabled.\n";
+ foreach (Light *light, scene->lights) {
+ if (light->type == LIGHT_BACKGROUND) {
+ light->is_enabled = !disable_mis;
}
}
}