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>2017-04-27 23:27:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-05-01 19:11:21 +0300
commit27fc8ae1cb1f441fb9ac5240d70a1115b9353fc3 (patch)
tree1f0e36fb5763a1efe5476b0dc5df704605bf7850 /source/blender
parente868b459bb8efc35012b2364762f3d25d96b8b0d (diff)
Eevee: Change MAX2 to max_ff
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lights.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index 39e666cb613..d34515495c2 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -144,7 +144,7 @@ void EEVEE_lights_cache_finish(EEVEE_StorageList *stl, EEVEE_TextureList *txl, E
/* Initialize Textures Arrays first so DRW_framebuffer_init just bind them */
if (!txl->shadow_depth_cube_pool) {
txl->shadow_depth_cube_pool = DRW_texture_create_2D_array(
- 512, 512, MAX2(1, linfo->num_cube * 6), DRW_TEX_DEPTH_24,
+ 512, 512, max_ff(1, linfo->num_cube * 6), DRW_TEX_DEPTH_24,
DRW_TEX_FILTER | DRW_TEX_COMPARE, NULL);
if (fbl->shadow_cube_fb) {
DRW_framebuffer_texture_attach(fbl->shadow_cube_fb, txl->shadow_depth_cube_pool, 0, 0);
@@ -152,7 +152,7 @@ void EEVEE_lights_cache_finish(EEVEE_StorageList *stl, EEVEE_TextureList *txl, E
}
if (!txl->shadow_depth_map_pool) {
txl->shadow_depth_map_pool = DRW_texture_create_2D_array(
- 512, 512, MAX2(1, linfo->num_map), DRW_TEX_DEPTH_24,
+ 512, 512, max_ff(1, linfo->num_map), DRW_TEX_DEPTH_24,
DRW_TEX_FILTER | DRW_TEX_COMPARE, NULL);
if (fbl->shadow_map_fb) {
DRW_framebuffer_texture_attach(fbl->shadow_map_fb, txl->shadow_depth_map_pool, 0, 0);
@@ -160,7 +160,7 @@ void EEVEE_lights_cache_finish(EEVEE_StorageList *stl, EEVEE_TextureList *txl, E
}
if (!txl->shadow_depth_cascade_pool) {
txl->shadow_depth_cascade_pool = DRW_texture_create_2D_array(
- 512, 512, MAX2(1, linfo->num_cascade * MAX_CASCADE_NUM), DRW_TEX_DEPTH_24,
+ 512, 512, max_ff(1, linfo->num_cascade * MAX_CASCADE_NUM), DRW_TEX_DEPTH_24,
DRW_TEX_FILTER | DRW_TEX_COMPARE, NULL);
if (fbl->shadow_cascade_fb) {
DRW_framebuffer_texture_attach(fbl->shadow_cascade_fb, txl->shadow_depth_map_pool, 0, 0);
@@ -215,19 +215,19 @@ static void eevee_light_setup(Object *ob, EEVEE_LampsInfo *linfo, EEVEE_LampEngi
evli->sizey = scale[1] / scale[2];
evli->spotsize = cosf(la->spotsize * 0.5f);
evli->spotblend = (1.0f - evli->spotsize) * la->spotblend;
- evli->radius = MAX2(0.001f, la->area_size);
+ evli->radius = max_ff(0.001f, la->area_size);
}
else if (la->type == LA_AREA) {
- evli->sizex = MAX2(0.0001f, la->area_size * scale[0] * 0.5f);
+ evli->sizex = max_ff(0.0001f, la->area_size * scale[0] * 0.5f);
if (la->area_shape == LA_AREA_RECT) {
- evli->sizey = MAX2(0.0001f, la->area_sizey * scale[1] * 0.5f);
+ evli->sizey = max_ff(0.0001f, la->area_sizey * scale[1] * 0.5f);
}
else {
- evli->sizey = MAX2(0.0001f, la->area_size * scale[1] * 0.5f);
+ evli->sizey = max_ff(0.0001f, la->area_size * scale[1] * 0.5f);
}
}
else {
- evli->radius = MAX2(0.001f, la->area_size);
+ evli->radius = max_ff(0.001f, la->area_size);
}
/* Make illumination power constant */