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:
authorClément Foucault <foucault.clem@gmail.com>2018-07-09 23:29:45 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-09 23:29:45 +0300
commitabbd9971933e7bbca926d118a74f1d1f9c19d2a4 (patch)
treeb91e055df4b1aa49e84f140f6c17007bc2be5b27
parent0f13e5366964c1eb8a62aafbaeb37383cd2da360 (diff)
Eevee: LightCache: Use render visibility to select the probe
If a probe is not visible during render, it will not be selected to be baked into the lightcache.
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 0828d7bfa93..8ae18c8deb8 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -407,6 +407,10 @@ static void eevee_lightbake_count_probes(EEVEE_LightBake *lbake)
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN(depsgraph, ob)
{
+ if (!BKE_object_is_visible(ob, OB_VISIBILITY_CHECK_FOR_RENDER)) {
+ continue;
+ }
+
if (ob->type == OB_LIGHTPROBE) {
LightProbe *prb = (LightProbe *)ob->data;
@@ -939,6 +943,10 @@ static void eevee_lightbake_gather_probes(EEVEE_LightBake *lbake)
* This allows a large number of probe to be precomputed (even dupli ones). */
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN(depsgraph, ob)
{
+ if (!BKE_object_is_visible(ob, OB_VISIBILITY_CHECK_FOR_RENDER)) {
+ continue;
+ }
+
if (ob->type == OB_LIGHTPROBE) {
LightProbe *prb = (LightProbe *)ob->data;