diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-15 23:22:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-15 23:23:51 +0300 |
commit | d8d1f637b1b0775048ef797d10b96b42c79bf4f8 (patch) | |
tree | ea90f2883d7c4cfc84726eeffc0b3e117da96b7f /source/blender/draw/engines/eevee/eevee_private.h | |
parent | dd6fcd2f21090971f0298f95c2c0d51d7a85608a (diff) |
Eevee: Shadows: Transition to individual face rendering.
This gets rid of the need of a geom shader and instancing.
Both are pretty slow compared to the new method.
The only moment the old method could be better is when scene is filled
with lots of objects and most of the objects in the shadow map appear
on every layer.
But even then, we could optimize the culling and minimize the overhead.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index bf77914832e..306a5c8bb01 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -675,7 +675,8 @@ typedef struct EEVEE_ShadowCubeData { typedef struct EEVEE_ShadowCascadeData { short light_id, shadow_id, cascade_id, layer_id; float viewprojmat[MAX_CASCADE_NUM][4][4]; /* World->Lamp->NDC : used for rendering the shadow map. */ - DRWMatrixState clipmat; /* Override matrices used for clipping. */ + float projmat[MAX_CASCADE_NUM][4][4]; + float viewmat[4][4], viewinv[4][4]; float radius[MAX_CASCADE_NUM]; } EEVEE_ShadowCascadeData; @@ -806,7 +807,7 @@ void EEVEE_lights_cache_shcaster_add( void EEVEE_lights_cache_shcaster_material_add( EEVEE_ViewLayerData *sldata, EEVEE_PassList *psl, struct GPUMaterial *gpumat, struct Gwn_Batch *geom, struct Object *ob, - float (*obmat)[4], float *alpha_threshold); + float *alpha_threshold); void EEVEE_lights_cache_shcaster_object_add(EEVEE_ViewLayerData *sldata, struct Object *ob); void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata); void EEVEE_lights_update(EEVEE_ViewLayerData *sldata); |