]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/colorcurve.cpp
Cosmetic fixes
[libs/gl.git] / source / effects / colorcurve.cpp
index 130fa8df2a45f6b7be2fe711186273a8da26a5b1..9e242d1984007c2c5ea8565f3533630f323f8065 100644 (file)
@@ -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));
 }