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-10 16:02:25 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-10 16:31:34 +0300
commit1a43e081873415754950766edaddad220adf67bc (patch)
tree6a4e61b2337606daf442973d9f82e1d56b906a98 /source/blender/blenkernel
parent97f90d48a02eef89949532b166f57ea178ee5a87 (diff)
Eevee: LightCache: Initial Implementation
This separate probe rendering from viewport rendering, making possible to run the baking in another thread (non blocking and faster). The baked lighting is saved in the blend file. Nothing needs to be recomputed on load. There is a few missing bits / bugs: - Cache cannot be saved to disk as a separate file, it is saved in the DNA for now making file larger and memory usage higher. - Auto update only cubemaps does update the grids (bug). - Probes cannot be updated individually (considered as dynamic). - Light Cache cannot be (re)generated during render.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/scene.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 1b309d76f61..2b2fc2fc767 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -102,6 +102,9 @@
#include "DEG_depsgraph_query.h"
#include "RE_engine.h"
+#include "RE_engine.h"
+
+#include "engines/eevee/eevee_lightcache.h"
#include "PIL_time.h"
@@ -316,6 +319,9 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons
else {
sce_dst->preview = NULL;
}
+
+ sce_dst->eevee.light_cache = NULL;
+ /* TODO Copy the cache. */
}
Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
@@ -511,6 +517,11 @@ void BKE_scene_free_ex(Scene *sce, const bool do_id_user)
sce->master_collection = NULL;
}
+ if (sce->eevee.light_cache) {
+ EEVEE_lightcache_free(sce->eevee.light_cache);
+ sce->eevee.light_cache = NULL;
+ }
+
/* These are freed on doversion. */
BLI_assert(sce->layer_properties == NULL);
}
@@ -814,6 +825,8 @@ void BKE_scene_init(Scene *sce)
sce->eevee.gi_diffuse_bounces = 3;
sce->eevee.gi_cubemap_resolution = 512;
sce->eevee.gi_visibility_resolution = 32;
+ sce->eevee.gi_cubemap_draw_size = 0.3f;
+ sce->eevee.gi_irradiance_draw_size = 0.1f;
sce->eevee.taa_samples = 16;
sce->eevee.taa_render_samples = 64;
@@ -856,6 +869,8 @@ void BKE_scene_init(Scene *sce)
sce->eevee.shadow_cube_size = 512;
sce->eevee.shadow_cascade_size = 1024;
+ sce->eevee.light_cache = NULL;
+
sce->eevee.flag =
SCE_EEVEE_VOLUMETRIC_LIGHTS |
SCE_EEVEE_VOLUMETRIC_COLORED |