mirror of https://github.com/GNOME/gimp.git
sphere-designer: Lessen code
This commit is contained in:
parent
581767bb84
commit
327e02537a
|
@ -1380,7 +1380,7 @@ calclight (GimpVector4 * col, GimpVector4 * point, common * obj)
|
||||||
static void
|
static void
|
||||||
calcphong (common * obj, ray * r2, GimpVector4 * col)
|
calcphong (common * obj, ray * r2, GimpVector4 * col)
|
||||||
{
|
{
|
||||||
gint i, j, o;
|
gint i, j;
|
||||||
ray r;
|
ray r;
|
||||||
gdouble b;
|
gdouble b;
|
||||||
GimpVector4 lcol;
|
GimpVector4 lcol;
|
||||||
|
@ -1403,11 +1403,8 @@ calcphong (common * obj, ray * r2, GimpVector4 * col)
|
||||||
vcopy (&r.v2, &world.light[i].a);
|
vcopy (&r.v2, &world.light[i].a);
|
||||||
vmix (&r.v1, &r.v1, &r.v2, 0.9999);
|
vmix (&r.v1, &r.v1, &r.v2, 0.9999);
|
||||||
|
|
||||||
o = traceray (&r, NULL, -1, 1.0);
|
if (traceray (&r, NULL, -1, 1.0))
|
||||||
if (o)
|
continue;
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* OK, light is visible */
|
/* OK, light is visible */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue