X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcolorcurve.h;fp=source%2Fcolorcurve.h;h=f66ff976d7a0d06dc020980239b9adcf0676d008;hp=75e7fd302a76a2bea330162942c7c881379dd2c5;hb=a1eb8711ba225bb4423868c50369ad5592465171;hpb=825a334729ded60f7b554af4b2d5ab57122efbe9 diff --git a/source/colorcurve.h b/source/colorcurve.h index 75e7fd30..f66ff976 100644 --- a/source/colorcurve.h +++ b/source/colorcurve.h @@ -14,7 +14,9 @@ Processes oversaturated colors to preserve hues. When one color component exceeds 1.0, the others are scaled towards white. A transition curve is also applied near 1.0 to prevent the abrupt change in the gradient. -Only makes sense when used in an HDR framebuffer. +Gamma or sRGB correction can also be applied to the output. It can be used to +improve color reproduction by performing lighting calculations in linear color +space and converting to sRGB for display. */ class ColorCurve: public PostProcessor { @@ -35,8 +37,15 @@ public: saturated value. */ void set_brightness(float); + /** Sets the gamma value used for mapping output colors. Allowed range is + from 0.1 to 10. */ void set_gamma(float); + + /** Sets output mapping to sRGB. This is almost, but not exactly equivalent + to set_gamma(2.2). */ void set_srgb(); + + /// Sets output mapping to linear. This is equivalent to set_gamma(1). void set_linear(); virtual void render(const Texture2D &, const Texture2D &);