reenabled auto scale for derivative maps
This commit is contained in:
@@ -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++)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user