diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-04-21 17:43:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-04-21 17:43:35 +0300 |
commit | 8ac1f03f411c98efe4ca4d568a2b231ff59b2505 (patch) | |
tree | c8d04a38b5dd83a90100e8819db90186c84830f5 /source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | |
parent | cc2d501642555616f3e8808bdbaa72f9c752e1a1 (diff) |
Eevee: Cascaded Shadow Maps, follow up.
- Compute coarse bounding box of split frustum. Can be improved
- Make use of 4 cascade.
- View dependant glitches are fixed.
- Optimized shader code.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index b907adc2323..5762ca45b71 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -59,16 +59,11 @@ struct ShadowMapData { struct ShadowCascadeData { mat4 shadowmat[MAX_CASCADE_NUM]; - vec4 bias_count; - float near[MAX_CASCADE_NUM]; - float far[MAX_CASCADE_NUM]; + /* arrays of float are not aligned so use vec4 */ + vec4 split_distances; + vec4 bias; }; -/* convenience aliases */ -#define sh_cascade_bias bias_count.x -#define sh_cascade_count bias_count.y - - struct AreaData { vec3 corner[4]; float solid_angle; |