Fix for bug #8963: area light + cubic shading became darker

for values > 1.0, luckily for peach this bug was not present
for other light types.
This commit is contained in:
Brecht Van Lommel 2008-04-19 21:58:11 +00:00
parent bdf5c0689b
commit f3c3da530c

@ -1303,7 +1303,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
}
/* 'is' is diffuse */
if((ma->shade_flag & MA_CUBIC) && is>0.0f)
if((ma->shade_flag & MA_CUBIC) && is>0.0f && is<1.0f)
is= 3.0*is*is - 2.0*is*is*is; // nicer termination of shades
i= is*phongcorr;