GNOME Bugzilla – Bug 470698
MapObject cannot modify highlight
Last modified: 2009-10-12 19:27:56 UTC
Please describe the problem: if you try to insert a value of light intensity different from 27 it will result in a strange black halo. Steps to reproduce: 1. on the current layer of an image open the filter Map to Object 2. modify the light intensity value on the Material panel to a value different from 27 3. preview it Actual results: black halo. It will be very clear if drawn on a sphere Expected results: no halo Does this happen every time? yep, even under windows with 2.4 rc1 Other information: svn version compiled under gnu/linux
Created attachment 94426 [details] MapObject light bug
Indeed, this looks wrong. The black area can be seen easily if you map to a Sphere or a Cylinder. It appears as soon as you change the Highlight value from 27 to 27.1 or 26.9. (Note: the name of the option is Reflectivity / Highlight, not light intensity. I have updated the title of this bug report accordingly)
Created attachment 140350 [details] [review] Proposed patch This is an oversight, see for example: http://en.wikipedia.org/wiki/Specular_highlight
Please do not use function calls or calculations in a MAX() macro as this macro evaluates its arguments multiple times.
Created attachment 140422 [details] [review] Improved version of the proposed fix Used to C++'s std::max I forgot the dangers of macros.
Committed to master and gimp-2-6: commit 05304f6d8308bec8ba68b1df5a2914df2a62fee0 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(-) 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(-)
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
(In reply to comment #7) > This problem has been fixed in our software repository. The fix will go into > the next software release. Thank you for your bug report. you're welcome, looking forward to test it!