diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-06 22:43:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-06 22:43:44 +0300 |
commit | c502114ee11dcd2e737452944b652205517b5682 (patch) | |
tree | 4b59a9066954bc8851297c7ce38f647088b8e02c /intern/cycles/render/light.h | |
parent | f25f7c803020b9341e49e898abe94917c3235515 (diff) |
Cycles: Solve issues with auto-disabled MIS
There were two issues:
1. Memory leak: std:;erase does not call delete on the
pointer (which is actually a good idea),
2. After MIS was disabled in viewport render there was
no way to bring MIS back.
Now instead of removing light from the scene data we
kind of tagging it for an ignore. Possible cleanup
would be to add Light::is_enabled and use that instead
of passing weird and wonderful function arguments.
Diffstat (limited to 'intern/cycles/render/light.h')
-rw-r--r-- | intern/cycles/render/light.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h index afec3628dda..bba03e33a86 100644 --- a/intern/cycles/render/light.h +++ b/intern/cycles/render/light.h @@ -82,9 +82,18 @@ public: void tag_update(Scene *scene); protected: - void device_update_points(Device *device, DeviceScene *dscene, Scene *scene); + bool skip_background_light(Device *device, Scene *scene); + + void device_update_points(Device *device, + DeviceScene *dscene, + Scene *scene, + bool skip_background); void device_update_distribution(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress); - void device_update_background(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress); + void device_update_background(Device *device, + DeviceScene *dscene, + Scene *scene, + Progress& progress, + bool skip_background); }; CCL_NAMESPACE_END |