diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 19:12:01 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 19:12:16 +0300 |
commit | 7dd0be9554ae7a728ded1a95d4709a93b68301b4 (patch) | |
tree | 52a097fd8edd1128def41fcda6bed64e8c6b39b7 /source/blender/editors/render/render_shading.c | |
parent | c476c36e400883d929a7149def8dcb6ad6157a86 (diff) |
EEVEE: Replace octahedron reflection probe by cubemap array
We implement cubemap array support for EEVEE's lightcache reflection probes.
This removes stretched texels and bottom hemisphere seams artifacts caused
by the octahedral projection previously used.
This introduce versioning code for the lightcache which will discard any
lightcache version that is not compatible.
Differential Revision: https://developer.blender.org/D7066
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 94e210b7243..95d044554f1 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -890,14 +890,14 @@ enum { static void light_cache_bake_tag_cache(Scene *scene, wmOperator *op) { - if (scene->eevee.light_cache != NULL) { + if (scene->eevee.light_cache_data != NULL) { int subset = RNA_enum_get(op->ptr, "subset"); switch (subset) { case LIGHTCACHE_SUBSET_ALL: - scene->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_GRID | LIGHTCACHE_UPDATE_CUBE; + scene->eevee.light_cache_data->flag |= LIGHTCACHE_UPDATE_GRID | LIGHTCACHE_UPDATE_CUBE; break; case LIGHTCACHE_SUBSET_CUBE: - scene->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_CUBE; + scene->eevee.light_cache_data->flag |= LIGHTCACHE_UPDATE_CUBE; break; case LIGHTCACHE_SUBSET_DIRTY: /* Leave tag untouched. */ @@ -1046,7 +1046,7 @@ static bool light_cache_free_poll(bContext *C) { Scene *scene = CTX_data_scene(C); - return scene->eevee.light_cache; + return scene->eevee.light_cache_data; } static int light_cache_free_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1057,12 +1057,12 @@ static int light_cache_free_exec(bContext *C, wmOperator *UNUSED(op)) wmWindowManager *wm = CTX_wm_manager(C); WM_jobs_kill_type(wm, scene, WM_JOB_TYPE_LIGHT_BAKE); - if (!scene->eevee.light_cache) { + if (!scene->eevee.light_cache_data) { return OPERATOR_CANCELLED; } - EEVEE_lightcache_free(scene->eevee.light_cache); - scene->eevee.light_cache = NULL; + EEVEE_lightcache_free(scene->eevee.light_cache_data); + scene->eevee.light_cache_data = NULL; EEVEE_lightcache_info_update(&scene->eevee); |