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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-02-07 00:21:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-02-07 00:21:38 +0300
commite360080a04e0615eb036612834b6ddcd1816365d (patch)
tree4163bae98d01a6656af468535df41f4f5122a524 /intern/cycles/render/light.h
parent7faa9d1304bc500185684a41f8bd65fb4893b8bb (diff)
Cycles: Refactor the way how we exclude light from the device
This unifies things around ignoring light due to lack of scene contribution or due to other optimization tricks.
Diffstat (limited to 'intern/cycles/render/light.h')
-rw-r--r--intern/cycles/render/light.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h
index bba03e33a86..15038d0a920 100644
--- a/intern/cycles/render/light.h
+++ b/intern/cycles/render/light.h
@@ -57,6 +57,7 @@ public:
bool use_scatter;
bool is_portal;
+ bool is_enabled;
int shader;
int samples;
@@ -76,24 +77,32 @@ public:
LightManager();
~LightManager();
- void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress);
+ void device_update(Device *device,
+ DeviceScene *dscene,
+ Scene *scene,
+ Progress& progress);
void device_free(Device *device, DeviceScene *dscene);
void tag_update(Scene *scene);
protected:
- bool skip_background_light(Device *device, Scene *scene);
+ /* Optimization: disable light which is either unsupported or
+ * which doesn't contribute to the scene or which is only used for MIS
+ * and scene doesn't need MIS.
+ */
+ void disable_ineffective_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);
+ Scene *scene);
+ void device_update_distribution(Device *device,
+ DeviceScene *dscene,
+ Scene *scene,
+ Progress& progress);
void device_update_background(Device *device,
DeviceScene *dscene,
Scene *scene,
- Progress& progress,
- bool skip_background);
+ Progress& progress);
};
CCL_NAMESPACE_END