reenabled auto scale for derivative maps
authorMorten Mikkelsen <mikkelsen7@gmail.com>
Thu, 15 Dec 2011 15:48:44 +0000 (15:48 +0000)
committerMorten Mikkelsen <mikkelsen7@gmail.com>
Thu, 15 Dec 2011 15:48:44 +0000 (15:48 +0000)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/render/intern/source/render_texture.c

index 0087b91c6158f37858c90032e4df1f545a2c8d89..06f29b95825b550c51dc47c81cf14890ea239ac2 100644 (file)
@@ -2006,13 +2006,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
                tfdata = fdata;
 
        /* calc auto bump scale if necessary */
-#if 0
        if(dm->auto_bump_scale<=0.0f)
                DM_calc_auto_bump_scale(dm);
-#else
-       dm->auto_bump_scale = 1.0f; // will revert this after release
-#endif
-
 
        /* add a tangent layer if necessary */
        for(b = 0; b < gattribs->totlayer; b++)
index 07e2cc3a701d5add228afe06bc6dba7448785071..202c7dcfadadb570b2801c83afbea1b3bf028d5e 100644 (file)
@@ -1968,8 +1968,8 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
                if(shi->obr->ob->derivedFinal)
                {
                        auto_bump = shi->obr->ob->derivedFinal->auto_bump_scale;
-                       auto_bump /= sqrtf((float) (dimx*dimy));
                }
+               auto_bump /= sqrtf((float) (dimx*dimy));
                
                // this variant using a derivative map is described here
                // http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html