svn merge ^/trunk/blender -r43092:43092

This commit is contained in:
2012-01-04 06:20:10 +00:00
15 changed files with 126 additions and 287 deletions

View File

@@ -1120,7 +1120,11 @@ static void do_material_tex(GPUShadeInput *shi)
// to inverting the bump map. Should this ever change
// this negate must be removed.
norfac = -hScale * mtex->norfac;
if(found_deriv_map) norfac /= sqrtf(ima_x*ima_y);
if(found_deriv_map)
{
float fVirtDim = sqrtf(fabsf(ima_x*mtex->size[0]*ima_y*mtex->size[1]));
norfac /= MAX2(fVirtDim, FLT_EPSILON);
}
tnorfac = GPU_uniform(&norfac);