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>2017-12-02 02:59:58 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-12-04 12:10:27 +0300
commitd439e87064fcc90dee4413affaf405db5a994e1a (patch)
tree5b1857c52efb468020ef75e569411049e7180513 /source/blender
parenteb605c2c2b01ff6d5058c03a1d3b2d7b11d7fc84 (diff)
Eevee: Irradiance Grid: Fix problem with bounce update.
Before this patch, if one of the grid was updated (moved) only the subsequents evaluated grids had their level reset and had all their bounces recomputed.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 7755b692559..32b5023c65e 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -694,6 +694,13 @@ static void EEVEE_lightprobes_updates(EEVEE_ViewLayerData *sldata, EEVEE_PassLis
EEVEE_LightGrid *egrid = &pinfo->grid_data[i];
EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_ensure(ob);
+ /* If one grid has move we need to recompute all the lighting. */
+ if (!pinfo->grid_initialized) {
+ ped->updated_cells = 0;
+ ped->updated_lvl = 0;
+ ped->need_update = true;
+ }
+
/* Add one for level 0 */
ped->max_lvl = 1.0f + floorf(log2f((float)MAX3(probe->grid_resolution_x,
probe->grid_resolution_y,