diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-01 20:52:05 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-01 20:52:05 +0300 |
commit | 755c5c6e4c86fed28646c18f0a78a5fa9c0fd4d6 (patch) | |
tree | 95bc46277c67fac31ed557b07e888f56a58ca051 /source/blender/draw | |
parent | 4723644e7f5b9ac607844fb9c43fafda7360e606 (diff) |
EEVEE: Shadows: Remove 1 pixel padding to the cubemap
This avoid having a much higher memory footprint as the underlying texture
size allocated by the driver is likely to be much higher (rounded to next
Power of 2 or other alignement requirements).
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_shadows.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_shadows.c b/source/blender/draw/engines/eevee/eevee_shadows.c index d0e430e115f..8c50b26b45f 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows.c +++ b/source/blender/draw/engines/eevee/eevee_shadows.c @@ -260,10 +260,8 @@ void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) } if (!sldata->shadow_cube_pool) { - /* TODO shadowcube array. */ - int cube_size = linfo->shadow_cube_size + ((true) ? 2 : 0); - sldata->shadow_cube_pool = DRW_texture_create_2d_array(cube_size, - cube_size, + sldata->shadow_cube_pool = DRW_texture_create_2d_array(linfo->shadow_cube_size, + linfo->shadow_cube_size, max_ii(1, linfo->num_cube_layer * 6), shadow_pool_format, DRW_TEX_FILTER | DRW_TEX_COMPARE, |