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:
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 19500cd454e..ddda9cd3bf8 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -33,6 +33,7 @@ extern struct DrawEngineType draw_engine_eevee_type;
/* Minimum UBO is 16384 bytes */
#define MAX_PROBE 128 /* TODO : find size by dividing UBO max size by probe data size */
#define MAX_GRID 64 /* TODO : find size by dividing UBO max size by grid data size */
+#define MAX_PLANAR 16 /* TODO : find size by dividing UBO max size by grid data size */
#define MAX_LIGHT 128 /* TODO : find size by dividing UBO max size by light data size */
#define MAX_SHADOW_CUBE 42 /* TODO : Make this depends on GL_MAX_ARRAY_TEXTURE_LAYERS */
#define MAX_SHADOW_MAP 64
@@ -90,6 +91,8 @@ typedef struct EEVEE_FramebufferList {
struct GPUFrameBuffer *dof_scatter_far_fb;
struct GPUFrameBuffer *dof_scatter_near_fb;
+ struct GPUFrameBuffer *planarref_fb;
+
struct GPUFrameBuffer *main; /* HDR */
} EEVEE_FramebufferList;
@@ -105,6 +108,8 @@ typedef struct EEVEE_TextureList {
struct GPUTexture *bloom_downsample[MAX_BLOOM_STEP]; /* R16_G16_B16 */
struct GPUTexture *bloom_upsample[MAX_BLOOM_STEP-1]; /* R16_G16_B16 */
+ struct GPUTexture *planar_pool;
+
struct GPUTexture *color; /* R16_G16_B16 */
} EEVEE_TextureList;
@@ -193,10 +198,21 @@ typedef struct EEVEE_LightGrid {
float increment_z[3], pad4;
} EEVEE_LightGrid;
+typedef struct EEVEE_PlanarReflection {
+ float plane_equation[4];
+ float clip_vec_x[3], attenuation_scale;
+ float clip_vec_y[3], attenuation_bias;
+ float clip_edge_x_pos, clip_edge_x_neg;
+ float clip_edge_y_pos, clip_edge_y_neg;
+ float facing_scale, facing_bias, pad[2];
+ float reflectionmat[4][4];
+} EEVEE_PlanarReflection;
+
/* ************ PROBE DATA ************* */
typedef struct EEVEE_LightProbesInfo {
int num_cube, cache_num_cube;
int num_grid, cache_num_grid;
+ int num_planar, cache_num_planar;
int update_flag;
int updated_bounce;
/* Actual number of probes that have datas. */
@@ -219,9 +235,11 @@ typedef struct EEVEE_LightProbesInfo {
/* XXX This is fragile, can get out of sync quickly. */
struct Object *probes_cube_ref[MAX_PROBE];
struct Object *probes_grid_ref[MAX_GRID];
+ struct Object *probes_planar_ref[MAX_PLANAR];
/* UBO Storage : data used by UBO */
struct EEVEE_LightProbe probe_data[MAX_PROBE];
struct EEVEE_LightGrid grid_data[MAX_GRID];
+ struct EEVEE_PlanarReflection planar_data[MAX_PLANAR];
} EEVEE_LightProbesInfo;
/* EEVEE_LightProbesInfo->update_flag */
@@ -296,6 +314,7 @@ typedef struct EEVEE_SceneLayerData {
struct GPUUniformBuffer *probe_ubo;
struct GPUUniformBuffer *grid_ubo;
+ struct GPUUniformBuffer *planar_ubo;
struct GPUFrameBuffer *probe_fb;
struct GPUFrameBuffer *probe_filter_fb;
@@ -322,6 +341,9 @@ typedef struct EEVEE_LightProbeEngineData {
int updated_cells;
int num_cell;
int probe_id; /* Only used for display data */
+ /* For planar reflection rendering */
+ float viewmat[4][4];
+ float persmat[4][4];
struct ListBase captured_object_list;
} EEVEE_LightProbeEngineData;
@@ -380,11 +402,11 @@ void EEVEE_draw_shadows(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
void EEVEE_lights_free(void);
/* eevee_lightprobes.c */
-void EEVEE_lightprobes_init(EEVEE_SceneLayerData *sldata);
+void EEVEE_lightprobes_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata);
void EEVEE_lightprobes_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl, EEVEE_StorageList *stl);
void EEVEE_lightprobes_cache_add(EEVEE_SceneLayerData *sldata, Object *ob);
void EEVEE_lightprobes_cache_finish(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata);
-void EEVEE_lightprobes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl);
+void EEVEE_lightprobes_refresh(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata);
void EEVEE_lightprobes_free(void);
/* eevee_effects.c */