Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-04-30 17:02:24 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-30 17:39:26 +0300
commiteb7188802daf5909351d8a3c01b68303b655c1bc (patch)
tree137c2c43be509c07efa96ba49c63b5632974cceb /source/blender/draw/engines/eevee/eevee_lights.c
parent41431eacfa1afc66533f5d27cc21dfa58024e26c (diff)
DRW: Remove DRWTextureFormat in favor or GPUTextureFormat.
Because: - Less redundancy. - Better suffixes. Also a few modification to GPU_texture_create_* to simplify the API: - make the format explicit to the texture creation process. - remove the component count as it's specified in the GPUTextureFormat.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lights.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lights.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index 190f489ca50..76e8fe83f0a 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -472,7 +472,7 @@ void EEVEE_lights_cache_shcaster_object_add(EEVEE_ViewLayerData *sldata, Object
void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata)
{
EEVEE_LampsInfo *linfo = sldata->lamps;
- DRWTextureFormat shadow_pool_format = DRW_TEX_R_32;
+ GPUTextureFormat shadow_pool_format = GPU_R32F;
sldata->common_data.la_num_light = linfo->num_light;
@@ -485,8 +485,8 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata)
}
switch (linfo->shadow_method) {
- case SHADOW_ESM: shadow_pool_format = ((linfo->shadow_high_bitdepth) ? DRW_TEX_R_32 : DRW_TEX_R_16); break;
- case SHADOW_VSM: shadow_pool_format = ((linfo->shadow_high_bitdepth) ? DRW_TEX_RG_32 : DRW_TEX_RG_16); break;
+ case SHADOW_ESM: shadow_pool_format = ((linfo->shadow_high_bitdepth) ? GPU_R32F : GPU_R16F); break;
+ case SHADOW_VSM: shadow_pool_format = ((linfo->shadow_high_bitdepth) ? GPU_RG32F : GPU_RG16F); break;
default:
BLI_assert(!"Incorrect Shadow Method");
break;
@@ -496,7 +496,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata)
/* TODO render everything on the same 2d render target using clip planes and no Geom Shader. */
/* Cubemaps */
sldata->shadow_cube_target = DRW_texture_create_cube(
- linfo->shadow_cube_target_size, DRW_TEX_DEPTH_24, 0, NULL);
+ linfo->shadow_cube_target_size, GPU_DEPTH_COMPONENT24, 0, NULL);
sldata->shadow_cube_blur = DRW_texture_create_cube(
linfo->shadow_cube_target_size, shadow_pool_format, DRW_TEX_FILTER, NULL);
}
@@ -504,7 +504,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata)
if (!sldata->shadow_cascade_target) {
/* CSM */
sldata->shadow_cascade_target = DRW_texture_create_2D_array(
- linfo->shadow_size, linfo->shadow_size, MAX_CASCADE_NUM, DRW_TEX_DEPTH_24, 0, NULL);
+ linfo->shadow_size, linfo->shadow_size, MAX_CASCADE_NUM, GPU_DEPTH_COMPONENT24, 0, NULL);
sldata->shadow_cascade_blur = DRW_texture_create_2D_array(
linfo->shadow_size, linfo->shadow_size, MAX_CASCADE_NUM, shadow_pool_format, DRW_TEX_FILTER, NULL);
}