[Bf-blender-cvs] [755c5c6e4c8] master: EEVEE: Shadows: Remove 1 pixel padding to the cubemap

Clément Foucault noreply at git.blender.org
Wed Jul 1 19:53:43 CEST 2020


Commit: 755c5c6e4c86fed28646c18f0a78a5fa9c0fd4d6
Author: Clément Foucault
Date:   Wed Jul 1 19:52:05 2020 +0200
Branches: master
https://developer.blender.org/rB755c5c6e4c86fed28646c18f0a78a5fa9c0fd4d6

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).

===================================================================

M	source/blender/draw/engines/eevee/eevee_shadows.c

===================================================================

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,



More information about the Bf-blender-cvs mailing list