[Bf-blender-cvs] [abbd9971933] temp-eeveelightcache: Eevee: LightCache: Use render visibility to select the probe

Clément Foucault noreply at git.blender.org
Mon Jul 9 23:03:55 CEST 2018


Commit: abbd9971933e7bbca926d118a74f1d1f9c19d2a4
Author: Clément Foucault
Date:   Mon Jul 9 22:29:45 2018 +0200
Branches: temp-eeveelightcache
https://developer.blender.org/rBabbd9971933e7bbca926d118a74f1d1f9c19d2a4

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.

===================================================================

M	source/blender/draw/engines/eevee/eevee_lightcache.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list