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).
This commit is contained in:
Clément Foucault 2020-07-01 19:52:05 +02:00
parent 4723644e7f
commit 755c5c6e4c
1 changed files with 2 additions and 4 deletions

View File

@ -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,