X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Feffects%2Fcolorcurve.h;h=99263407d965bccaea891025a8ef7df035f67dea;hp=3ccfbf76b00d8c99493d63394ee2e59dad796fdc;hb=HEAD;hpb=1863f17c5c5563be8492d7f01e5c613a740ea1e9 diff --git a/source/effects/colorcurve.h b/source/effects/colorcurve.h index 3ccfbf76..99263407 100644 --- a/source/effects/colorcurve.h +++ b/source/effects/colorcurve.h @@ -2,17 +2,21 @@ #define MSP_GL_COLORCURVE_H_ #include "postprocessor.h" -#include "program.h" #include "programdata.h" #include "texture1d.h" namespace Msp { namespace GL { +class Program; + /** -Processes oversaturated colors to preserve hues. When one color component -exceeds 1.0, the overflow is distributed to the other components, scaling the -color towards white. +Maps high dynamic range colors to 8-bit and applies gamma correction. + +An exponential curve (with exponent less than or equal to 1) is applied to +simulate the response of the human eye. If the maximum color component of the +result exceeds 1, the overflow is distributed to the other components to +increase the apparent brightness without changing the hue. 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 @@ -33,12 +37,10 @@ public: void srgb(); }; - float exposure_adjust; - float brightness_response; - float gamma; - bool srgb; - - Template(); + float exposure_adjust = 0.0f; + float brightness_response = 0.4f; + float gamma = 1.0f; + bool srgb = false; virtual ColorCurve *create(unsigned, unsigned) const; };