mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/Lighting/lighting_shade.c: remove artifacts when light strikes underside of bumpmapped surface; should fix bug #163877.
This commit is contained in:
parent
15c4486298
commit
c8b1dfd54d
|
@ -1,3 +1,9 @@
|
|||
2005-01-13 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/Lighting/lighting_shade.c: remove artifacts
|
||||
when light strikes underside of bumpmapped surface;
|
||||
should fix bug #163877.
|
||||
|
||||
2005-01-13 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/bmp/bmp.h
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue