X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Feffects%2Fcolorcurve.cpp;h=9e242d1984007c2c5ea8565f3533630f323f8065;hp=130fa8df2a45f6b7be2fe711186273a8da26a5b1;hb=55e3f2d494d939280a4ea48676fd17ca2342b457;hpb=18449fc11c620be7b3115f28a5edfb57eb5985ef diff --git a/source/effects/colorcurve.cpp b/source/effects/colorcurve.cpp index 130fa8df..9e242d19 100644 --- a/source/effects/colorcurve.cpp +++ b/source/effects/colorcurve.cpp @@ -34,6 +34,7 @@ void ColorCurve::set_brightness_response(float b) { if(b<=0 || b>1) throw invalid_argument("ColorCurve::set_brightness_response"); + // Calculate an offset value to obtain a derivative of 1 at zero intensity. float t = (b<1 ? pow(b, 1/(1-b)) : 0.0f); shdata.uniform("brightness_response", b, t, pow(t, b)); }