Commit 9cc79768 authored by Ell's avatar Ell

bloom: change "amount" property to "threshold"

Rename the "amount" property to "threshold", and reverse its
interpretation; furthermore, increase the value ranges of the
properties.  This allows the glow to be limited to over-exposed
areas, by using a threshold > 100%.
parent 68478b7e
......@@ -23,13 +23,14 @@
#ifdef GEGL_PROPERTIES
property_double (amount, _("Amount"), 50.0)
property_double (threshold, _("Threshold"), 50.0)
description (_("Glow-area brightness threshold"))
value_range (0.0, 100.0)
ui_range (0.0, 100.0)
property_double (softness, _("Softness"), 25.0)
description (_("Glow-area edge softness"))
value_range (0.0, 100.0)
value_range (0.0, G_MAXDOUBLE)
ui_range (0.0, 100.0)
property_double (radius, _("Radius"), 10.0)
description (_("Glow radius"))
......@@ -40,7 +41,7 @@ property_double (radius, _("Radius"), 10.0)
property_double (strength, _("Strength"), 50.0)
description (_("Glow strength"))
value_range (0.0, 1000.0)
value_range (0.0, G_MAXDOUBLE)
ui_range (0.0, 100.0)
property_boolean (limit_exposure, _("Limit exposure"), FALSE)
......@@ -73,11 +74,9 @@ update (GeglOperation *operation)
if (nodes)
{
gdouble threshold = 1.0 - o->amount / 100.0;
gegl_node_set (nodes->levels,
"in-low", threshold - o->softness / 100.0,
"in-high", threshold + o->softness / 100.0,
"in-low", (o->threshold - o->softness) / 100.0,
"in-high", (o->threshold + o->softness) / 100.0,
"out-high", o->strength / 100.0,
NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment