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>2020-02-25 15:12:52 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-02-25 15:18:22 +0300
commit7e7c9276022f44495d9c7f9b3e09a2bd592aeab5 (patch)
tree67ce80f27a53a7d3a88b7b06b54d70568f99ed61 /source/blender/draw/engines/eevee/eevee_lightprobes.c
parent8885fb5929f23d59141986cda6f71f9503018a40 (diff)
Cleanup: EEVEE: Use log2_floor_u
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lightprobes.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 3201ffb10f4..52902d84b7e 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -1060,7 +1060,7 @@ void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata,
float target_size = (float)GPU_texture_width(rt_color);
/* Max lod used from the render target probe */
- pinfo->lod_rt_max = floorf(log2f(target_size)) - 2.0f;
+ pinfo->lod_rt_max = log2_floor_u(target_size) - 2.0f;
pinfo->intensity_fac = intensity;
/* Start fresh */
@@ -1169,7 +1169,7 @@ void EEVEE_lightbake_filter_diffuse(EEVEE_ViewLayerData *sldata,
pinfo->lodfactor = bias + 0.5f *
log((float)(target_size * target_size) * pinfo->samples_len_inv) /
log(2);
- pinfo->lod_rt_max = floorf(log2f(target_size)) - 2.0f;
+ pinfo->lod_rt_max = log2_floor_u(target_size) - 2.0f;
#else
pinfo->shres = 32; /* Less texture fetches & reduce branches */
pinfo->lod_rt_max = 2.0f; /* Improve cache reuse */