diff --git a/ChangeLog b/ChangeLog index 6231170336..3cde2616ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-13 Bill Skaggs + + * plug-ins/Lighting/lighting_shade.c: remove artifacts + when light strikes underside of bumpmapped surface; + should fix bug #163877. + 2005-01-13 Bill Skaggs * plug-ins/bmp/bmp.h diff --git a/plug-ins/Lighting/lighting_shade.c b/plug-ins/Lighting/lighting_shade.c index f4e62f53c6..50b0a45543 100644 --- a/plug-ins/Lighting/lighting_shade.c +++ b/plug-ins/Lighting/lighting_shade.c @@ -58,7 +58,7 @@ phong_shade (GimpVector3 *position, if (dist != 0.0) gimp_vector3_mul (&l, 1.0 / dist); - nl = 2.0 * gimp_vector3_inner_product (&n, &l); + nl = MAX (0., 2.0 * gimp_vector3_inner_product (&n, &l)); lnormal = l; gimp_vector3_normalize (&lnormal); @@ -74,7 +74,7 @@ phong_shade (GimpVector3 *position, gimp_vector3_add (&h, &lnormal, &v); gimp_vector3_normalize (&h); - rv = MAX (0., gimp_vector3_inner_product (&n, &h)); + rv = MAX (0.01, gimp_vector3_inner_product (&n, &h)); rv = pow (rv, mapvals.material.highlight); rv *= nl;