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 19:16:47 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-12 19:16:47 +0300
commit240ac779d585520a7dcea6a623b2e2ae082fb6f1 (patch)
tree36a803efd9ed3754e4e71d004c1351a1c44759a3 /source/blender/draw/engines/eevee/eevee_private.h
parent77e40708c2ce91cfa27930a0250c5602ec0e93ec (diff)
parent2218b61e8ea76b6cf139b3ba76e430f60d691211 (diff)
Merge branch 'blender-v2.90-release'
# Conflicts: # source/blender/draw/engines/eevee/eevee_motion_blur.c
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 34cd22ad13c..1e2de521cdf 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -595,25 +595,30 @@ typedef struct EEVEE_ObjectMotionData {
} EEVEE_ObjectMotionData;
typedef enum eEEVEEMotionData {
- EEVEE_MESH_GEOM_MOTION_DATA = 0,
- EEVEE_HAIR_GEOM_MOTION_DATA,
+ EEVEE_MOTION_DATA_MESH = 0,
+ EEVEE_MOTION_DATA_HAIR,
} eEEVEEMotionData;
+typedef struct EEVEE_HairMotionData {
+ /** Needs to be first to ensure casting. */
+ eEEVEEMotionData type;
+ int use_deform;
+ /** Allocator will alloc enough slot for all particle systems. Or 1 if it's a hair object. */
+ int psys_len;
+ struct {
+ struct GPUVertBuf *hair_pos[2]; /* Position buffer for time = t +/- step. */
+ struct GPUTexture *hair_pos_tx[2]; /* Buffer Texture of the corresponding VBO. */
+ } psys[0];
+} EEVEE_HairMotionData;
+
typedef struct EEVEE_GeometryMotionData {
+ /** Needs to be first to ensure casting. */
eEEVEEMotionData type;
- int use_deform; /* To disable deform mb if vertcount mismatch. */
- union {
- struct {
- /* Mesh */
- struct GPUBatch *batch; /* Batch for time = t. */
- struct GPUVertBuf *vbo[2]; /* Vbo for time = t +/- step. */
- };
- struct {
- /* Hair */
- struct GPUVertBuf *hair_pos[2]; /* Position buffer for time = t +/- step. */
- struct GPUTexture *hair_pos_tx[2]; /* Buffer Texture of the corresponding VBO. */
- };
- };
+ /** To disable deform mb if vertcount mismatch. */
+ int use_deform;
+
+ struct GPUBatch *batch; /* Batch for time = t. */
+ struct GPUVertBuf *vbo[2]; /* Vbo for time = t +/- step. */
} EEVEE_GeometryMotionData;
/* ************ EFFECTS DATA ************* */
@@ -914,6 +919,9 @@ typedef struct EEVEE_PrivateData {
float camtexcofac[4];
float size_orig[2];
+ /* Cached original camera when rendering for motion blur (see T79637). */
+ struct Object *cam_original_ob;
+
/* Mist Settings */
float mist_start, mist_inv_dist, mist_falloff;
@@ -971,9 +979,7 @@ EEVEE_ObjectMotionData *EEVEE_motion_blur_object_data_get(EEVEE_MotionBlurData *
bool hair);
EEVEE_GeometryMotionData *EEVEE_motion_blur_geometry_data_get(EEVEE_MotionBlurData *mb,
Object *ob);
-EEVEE_GeometryMotionData *EEVEE_motion_blur_hair_data_get(EEVEE_MotionBlurData *mb,
- Object *ob,
- struct ModifierData *md);
+EEVEE_HairMotionData *EEVEE_motion_blur_hair_data_get(EEVEE_MotionBlurData *mb, Object *ob);
EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_get(Object *ob);
EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_ensure(Object *ob);
EEVEE_LightEngineData *EEVEE_light_data_get(Object *ob);