4 #include "postprocessor.h"
6 #include "programdata.h"
13 Processes oversaturated colors to preserve hues. When one color component
14 exceeds 1.0, the others are scaled towards white. A transition curve is also
15 applied near 1.0 to prevent the abrupt change in the gradient.
17 Gamma or sRGB correction can also be applied to the output. It can be used to
18 improve color reproduction by performing lighting calculations in linear color
19 space and converting to sRGB for display.
21 class ColorCurve: public PostProcessor
32 /// Sets the size of the peak zone. Must be between 0 and 1, inclusive.
35 /** Sets brightness for oversaturated colors. Must be >= 1. Suggested
36 values are between 1.5 and 2.0; a value of 1.0 will clamp colors to the
38 void set_brightness(float);
40 /** Sets the gamma value used for mapping output colors. Allowed range is
42 void set_gamma(float);
44 /** Sets output mapping to sRGB. This is almost, but not exactly equivalent
48 /// Sets output mapping to linear. This is equivalent to set_gamma(1).
51 virtual void render(const Texture2D &, const Texture2D &);