X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcolorcurve.h;fp=source%2Fcolorcurve.h;h=0000000000000000000000000000000000000000;hb=7aaec9a70b8d7733429bec043f8e33e02956f266;hp=3f65b04916897c6d85bde7ec4f33fece160a3cd1;hpb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;p=libs%2Fgl.git diff --git a/source/colorcurve.h b/source/colorcurve.h deleted file mode 100644 index 3f65b049..00000000 --- a/source/colorcurve.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef MSP_GL_COLORCURVE_H_ -#define MSP_GL_COLORCURVE_H_ - -#include "postprocessor.h" -#include "program.h" -#include "programdata.h" -#include "texture1d.h" -#include "texturing.h" - -namespace Msp { -namespace GL { - -/** -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. - -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 -{ -public: - struct Template: public PostProcessor::Template - { - class Loader: public DataFile::DerivedObjectLoader - { - public: - Loader(Template &); - - private: - void gamma(float); - void srgb(); - }; - - float exposure_adjust; - float brightness_response; - float gamma; - bool srgb; - - Template(); - - virtual ColorCurve *create(unsigned, unsigned) const; - }; - -private: - Program shprog; - ProgramData shdata; - Texture1D curve; - Texturing texturing; - RefPtr quad; - RefPtr linear_sampler; - RefPtr nearest_sampler; - -public: - ColorCurve(); - - /** Set exposure adjustment in EV units. Positive values brighten the - image, negative values darken it. Zero is neutral. */ - void set_exposure_adjust(float); - - /** Sets the exponent of the */ - void set_brightness_response(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(Renderer &, const Texture2D &, const Texture2D &); -}; - -} // namespace GL -} // namespace Msp - -#endif