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/draw/engines/eevee/eevee_lightcache.h
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/draw/engines/eevee/eevee_lightcache.h')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.h b/source/blender/draw/engines/eevee/eevee_lightcache.h
new file mode 100644
index 00000000000..b58a0544c59
--- /dev/null
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2018, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Institute
+ *
+ */
+
+/** \file eevee_lightcache.h
+ * \ingroup eevee
+ */
+
+#ifndef __EEVEE_LIGHTCACHE_H__
+#define __EEVEE_LIGHTCACHE_H__
+
+#include "BLI_sys_types.h" /* for bool */
+
+struct ViewLayer;
+struct Scene;
+struct SceneEEVEE;
+struct LightCache;
+struct EEVEE_ViewLayerData;
+struct EEVEE_Data;
+struct EEVEE_LightBake;
+
+/* Light Bake */
+struct wmJob *EEVEE_lightbake_job_create(
+ struct wmWindowManager *wm, struct wmWindow *win, struct Main *bmain,
+ struct ViewLayer *view_layer, struct Scene *scene, int delay);
+void *EEVEE_lightbake_job_data_alloc(struct Main *bmain, struct ViewLayer *viewlayer, struct Scene *scene, bool run_as_job);
+void EEVEE_lightbake_job_data_free(void *custom_data);
+void EEVEE_lightbake_update(void *custom_data);
+void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float *progress);
+
+void EEVEE_lightbake_update_world_quick(struct EEVEE_ViewLayerData *sldata, struct EEVEE_Data *vedata, const Scene *scene);
+
+/* Light Cache */
+struct LightCache *EEVEE_lightcache_create(
+ const int grid_len, const int cube_len,
+ const int cube_size, const int vis_size,
+ const int irr_size[3]);
+void EEVEE_lightcache_free(struct LightCache *lcache);
+void EEVEE_lightcache_load(struct LightCache *lcache);
+void EEVEE_lightcache_info_update(struct SceneEEVEE *eevee);
+
+#endif /* __EEVEE_LIGHTCACHE_H__ */ \ No newline at end of file