reenabled auto scale for derivative maps

This commit is contained in:
Morten Mikkelsen
2011-12-15 15:48:44 +00:00
parent 6ccc605660
commit 490536561d
2 changed files with 1 additions and 6 deletions

View 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++)

View 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