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:
authorMorten Mikkelsen <mikkelsen7@gmail.com>2012-01-04 02:27:30 +0400
committerMorten Mikkelsen <mikkelsen7@gmail.com>2012-01-04 02:27:30 +0400
commit3b8404ac53af970559ec9224d76da0d7a06f084d (patch)
tree4ba6f8ce2f6f7821c2ffaea3a7c5913c2f47964e /source/blender/gpu
parentaa1325ef55bce6792acfa8141f0bb53b7529d2a1 (diff)
derivative maps must take into account that texture scales can be negative
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
1 files changed, 1 insertions, 1 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);
}