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:
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
-rw-r--r--source/blender/render/intern/source/render_texture.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index bf575e092dc..93ea067cfb7 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1122,7 +1122,7 @@ static void do_material_tex(GPUShadeInput *shi)
norfac = -hScale * mtex->norfac;
if(found_deriv_map)
{
- float fVirtDim = sqrtf(ima_x*mtex->size[0]*ima_y*mtex->size[1]);
+ float fVirtDim = sqrtf(fabsf(ima_x*mtex->size[0]*ima_y*mtex->size[1]));
norfac /= MAX2(fVirtDim, FLT_EPSILON);
}
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index d9cabf05155..5fba0bba48c 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1970,7 +1970,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
auto_bump = shi->obr->ob->derivedFinal->auto_bump_scale;
}
{
- float fVirtDim = sqrtf((float) (dimx*dimy)*mtex->size[0]*mtex->size[1]);
+ float fVirtDim = sqrtf(fabsf((float) (dimx*dimy)*mtex->size[0]*mtex->size[1]));
auto_bump /= MAX2(fVirtDim, FLT_EPSILON);
}