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>2022-05-11 02:22:28 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-05-12 13:45:56 +0300
commitf5077e057b01e3c19dd9ba00e3acee8138569ac9 (patch)
tree915a38988a2095b498c75f147d451b01e63d5c90 /source/blender/draw/engines/eevee/eevee_private.h
parent6f5d172d6cb1f91106cb2d918c4605da69269a40 (diff)
Fix T97380 EEVEE: Weird motion-blur on curves
This was caused by the `mb_data->obmat[]` being wrong because they are now shared between the particle system and the object. But Hair need the dupli parent matrix instead of the object matrix. Disabling `Show Emitter` option fixes the bug. To avoid this problem, request a different `EEVEE_ObjectMotionData` for particle systems using a different key pointer in the hash. This is a bit dirty but there is less code polution using this workaround. Differential Revision: https://developer.blender.org/D14911
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 6128556d364..b03a4fa70b4 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -644,8 +644,10 @@ typedef struct EEVEE_MotionBlurData {
} EEVEE_MotionBlurData;
typedef struct EEVEE_ObjectKey {
- /** Object or source object for duplis */
- struct Object *ob;
+ /** Object or source object for duplis. */
+ /** WORKAROUND: The pointer is different for particle systems and do not point to the real
+ * object. (See T97380) */
+ void *ob;
/** Parent object for duplis */
struct Object *parent;
/** Dupli objects recursive unique identifier */
@@ -1093,7 +1095,9 @@ EEVEE_ViewLayerData *EEVEE_view_layer_data_ensure_ex(struct ViewLayer *view_laye
EEVEE_ViewLayerData *EEVEE_view_layer_data_ensure(void);
EEVEE_ObjectEngineData *EEVEE_object_data_get(Object *ob);
EEVEE_ObjectEngineData *EEVEE_object_data_ensure(Object *ob);
-EEVEE_ObjectMotionData *EEVEE_motion_blur_object_data_get(EEVEE_MotionBlurData *mb, Object *ob);
+EEVEE_ObjectMotionData *EEVEE_motion_blur_object_data_get(EEVEE_MotionBlurData *mb,
+ Object *ob,
+ bool is_psys);
EEVEE_GeometryMotionData *EEVEE_motion_blur_geometry_data_get(EEVEE_ObjectMotionData *mb_data);
EEVEE_HairMotionData *EEVEE_motion_blur_hair_data_get(EEVEE_ObjectMotionData *mb_data, Object *ob);
EEVEE_HairMotionData *EEVEE_motion_blur_curves_data_get(EEVEE_ObjectMotionData *mb_data);