[gimp/gimp-2-6] Bug 470698 - MapObject cannot modify highlight



commit d67177d74438ff5883e97150f2764af5e7b5af1d
Author: Massimo Valentini <sixtysix inwind it>
Date:   Mon Oct 12 20:26:42 2009 +0200

    Bug 470698 -  MapObject cannot modify highlight

 plug-ins/map-object/map-object-shade.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/map-object/map-object-shade.c b/plug-ins/map-object/map-object-shade.c
index 3e8b5ad..2349849 100644
--- a/plug-ins/map-object/map-object-shade.c
+++ b/plug-ins/map-object/map-object-shade.c
@@ -77,7 +77,7 @@ phong_shade (GimpVector3 *pos,
       gimp_vector3_mul (&N, NL);
       gimp_vector3_sub (&NN, &N, &L);
       RV = gimp_vector3_inner_product (&NN, &V);
-      RV = pow (RV, mapvals.material.highlight);
+      RV = 0.0 < RV ? pow (RV, mapvals.material.highlight) : 0.0;
 
       /* Compute diffuse and specular intensity contribution */
       /* =================================================== */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]