Fix #29922: NaN pixels due to bump map in degenerate case.

This commit is contained in:
Brecht Van Lommel
2012-01-18 22:36:19 +00:00
parent 42fcd2919a
commit 7162ca5be7

View File

@@ -2127,7 +2127,8 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
fMagnitude *= len_v3(vN);
}
for(xyz=0; xyz<3; xyz++)
if(ntap_bump->fPrevMagnitude > 0.0f)
for(xyz=0; xyz<3; xyz++)
ntap_bump->vNacc[xyz] *= fMagnitude / ntap_bump->fPrevMagnitude;
ntap_bump->fPrevMagnitude = fMagnitude;