diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-04-19 23:07:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-04-20 14:07:51 +0300 |
commit | b386828671a40feea026ccefae17560e58e0d440 (patch) | |
tree | ac65240a1672c39cdb549e06503cc9c882043ff5 /source/blender/draw/engines/eevee/eevee_private.h | |
parent | 3fa665f56dc82d2fe379a6d79f335fc696cec626 (diff) |
Eevee: Do shadow cube render in one pass.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index 8be09091df8..97d78a7ce84 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -35,6 +35,7 @@ struct Object; typedef struct EEVEE_PassList { /* Shadows */ struct DRWPass *shadow_pass; + struct DRWPass *shadow_cube_pass; /* Probes */ struct DRWPass *probe_background; @@ -80,6 +81,7 @@ typedef struct EEVEE_StorageList { struct EEVEE_LampsInfo *lamps; struct GPUUniformBuffer *light_ubo; struct GPUUniformBuffer *shadow_ubo; + struct GPUUniformBuffer *shadow_render_ubo; /* Probes */ struct EEVEE_ProbesInfo *probes; @@ -114,12 +116,13 @@ typedef struct EEVEE_ShadowCascade { float far[MAX_CASCADE_NUM]; } EEVEE_ShadowCascade; -/* ************ LIGHT DATA ************* */ -typedef struct EEVEE_LampsInfo { - /* For rendering shadows */ - float shadowmat[4][4]; +typedef struct EEVEE_ShadowRender { + float shadowmat[6][4][4]; /* World->Lamp->NDC : used to render the shadow map. 6 frustrum for cubemap shadow */ int layer; +} EEVEE_ShadowRender; +/* ************ LIGHT DATA ************* */ +typedef struct EEVEE_LampsInfo { int num_light, cache_num_light; int num_cube, cache_num_cube; int num_map, cache_num_map; @@ -131,6 +134,7 @@ typedef struct EEVEE_LampsInfo { struct Object *shadow_cascade_ref[MAX_SHADOW_CASCADE]; /* UBO Storage : data used by UBO */ struct EEVEE_Light light_data[MAX_LIGHT]; + struct EEVEE_ShadowRender shadow_render_data; struct EEVEE_ShadowCube shadow_cube_data[MAX_SHADOW_CUBE]; struct EEVEE_ShadowMap shadow_map_data[MAX_SHADOW_MAP]; struct EEVEE_ShadowCascade shadow_cascade_data[MAX_SHADOW_CASCADE]; |