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>2020-08-12 14:52:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-12 19:06:36 +0300
commit2b042d885af1f34be7c223d0aeab6cd3589ad41f (patch)
tree6910461001852c8328a60a700bc58a68ee02b238 /source/blender/draw/engines/eevee/eevee_motion_blur.c
parentcfbea0e09de31bf325ecaa86d8dcf22dc9903634 (diff)
EEVEE: Motion Blur: Use evaluated object as key to motion data
This fix issues with instanced geometry and modifiers. Since the depsgraph will duplicate the objects when they have different modifiers, the evaluated object are garanteed to be unique.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_motion_blur.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_motion_blur.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c
index 400b309de07..e3dd4252018 100644
--- a/source/blender/draw/engines/eevee/eevee_motion_blur.c
+++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c
@@ -289,8 +289,7 @@ void EEVEE_motion_blur_hair_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata),
/* Store transform */
DRW_hair_duplimat_get(ob, psys, md, mb_data->obmat[mb_step]);
- EEVEE_GeometryMotionData *mb_geom = EEVEE_motion_blur_hair_data_get(
- &effects->motion_blur, ob, md);
+ EEVEE_GeometryMotionData *mb_geom = EEVEE_motion_blur_hair_data_get(&effects->motion_blur, ob);
if (mb_step == MB_CURR) {
/* Fill missing matrices if the object was hidden in previous or next frame. */
@@ -339,7 +338,8 @@ void EEVEE_motion_blur_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata),
const bool is_dupli = (ob->base_flag & BASE_FROM_DUPLI) != 0;
const bool object_moves = is_dupli || has_rigidbody || BKE_object_moves_in_time(ob, true);
#else
- /* BKE_object_moves_in_time does not work in some cases. Better */
+ /* BKE_object_moves_in_time does not work in some cases.
+ * Better detect non moving object after evaluation. */
const bool object_moves = true;
#endif
const bool is_deform = BKE_object_is_deform_modified(DRW_context_state_get()->scene, ob) ||