1 #ifndef _GAMMA_EXPANSION_EFFECT_H
2 #define _GAMMA_EXPANSION_EFFECT_H 1
4 // An effect to convert the given gamma curve into linear light,
5 // typically inserted by the framework automatically at the beginning
6 // of the processing chain.
8 // Currently supports sRGB and Rec. 601/709.
11 #include "effect_chain.h"
13 #define EXPANSION_CURVE_SIZE 256
15 class GammaExpansionEffect : public Effect {
17 GammaExpansionEffect();
18 virtual std::string effect_type_id() const { return "GammaExpansionEffect"; }
19 std::string output_fragment_shader();
21 virtual bool needs_linear_light() const { return false; }
22 virtual bool needs_srgb_primaries() const { return false; }
25 GammaCurve source_curve;
26 float expansion_curve[EXPANSION_CURVE_SIZE];
29 #endif // !defined(_GAMMA_EXPANSION_EFFECT_H)