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-06-14 23:46:48 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-06-15 01:55:45 +0300
commit246ee82a2f3c7e076c711659d876909dc4b410ea (patch)
tree3f5f38380dc5e8ec64d0875baa69f71b7bddf455 /source/blender
parent9c82203e8282551838898061e30422fb4a1a89c8 (diff)
Eevee: Some probe update changes.
Dont render grids if cubemap count changes (because it does not depends on). Recalc lighting if probe type change.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c23
-rw-r--r--source/blender/makesrna/intern/rna_lightprobe.c2
2 files changed, 16 insertions, 9 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 0a368229c83..b41b393b633 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -460,8 +460,6 @@ void EEVEE_lightprobes_cache_finish(EEVEE_SceneLayerData *sldata, EEVEE_PassList
e_data.update_world = true;
e_data.world_ready_to_shade = false;
pinfo->num_render_cube = 0;
- pinfo->num_render_grid = 0;
- pinfo->updated_bounce = 0;
pinfo->update_flag |= PROBE_UPDATE_CUBE;
pinfo->cache_num_cube = pinfo->num_cube;
@@ -470,12 +468,6 @@ void EEVEE_lightprobes_cache_finish(EEVEE_SceneLayerData *sldata, EEVEE_PassList
ped->need_update = true;
ped->ready_to_shade = false;
}
-
- for (int i = 1; (ob = pinfo->probes_grid_ref[i]) && (i < MAX_PROBE); i++) {
- EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(ob);
- ped->need_update = true;
- ped->updated_cells = 0;
- }
}
DRWFboTexture tex_filter = {&sldata->probe_pool, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
@@ -493,10 +485,25 @@ void EEVEE_lightprobes_cache_finish(EEVEE_SceneLayerData *sldata, EEVEE_PassList
if (!sldata->irradiance_pool) {
sldata->irradiance_pool = DRW_texture_create_2D(IRRADIANCE_POOL_SIZE, IRRADIANCE_POOL_SIZE, irradiance_format, DRW_TEX_FILTER, NULL);
pinfo->num_render_grid = 0;
+ pinfo->updated_bounce = 0;
+
+ for (int i = 1; (ob = pinfo->probes_grid_ref[i]) && (i < MAX_PROBE); i++) {
+ EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(ob);
+ ped->need_update = true;
+ ped->updated_cells = 0;
+ }
}
if (!sldata->irradiance_rt) {
sldata->irradiance_rt = DRW_texture_create_2D(IRRADIANCE_POOL_SIZE, IRRADIANCE_POOL_SIZE, irradiance_format, DRW_TEX_FILTER, NULL);
+ pinfo->num_render_grid = 0;
+ pinfo->updated_bounce = 0;
+
+ for (int i = 1; (ob = pinfo->probes_grid_ref[i]) && (i < MAX_PROBE); i++) {
+ EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(ob);
+ ped->need_update = true;
+ ped->updated_cells = 0;
+ }
}
EEVEE_lightprobes_updates(sldata, psl);
diff --git a/source/blender/makesrna/intern/rna_lightprobe.c b/source/blender/makesrna/intern/rna_lightprobe.c
index 4003cce3da5..3fb9daafce2 100644
--- a/source/blender/makesrna/intern/rna_lightprobe.c
+++ b/source/blender/makesrna/intern/rna_lightprobe.c
@@ -82,7 +82,7 @@ static void rna_def_lightprobe(BlenderRNA *brna)
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, lightprobe_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of probe");
- RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, NULL);
+ RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING, "rna_LightProbe_recalc");
prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");