Add a new framework for 1D-LUTs via fp16 textures. Make the gamma compression and...
[movit] / gamma_expansion_effect.h
1 #ifndef _GAMMA_EXPANSION_EFFECT_H 
2 #define _GAMMA_EXPANSION_EFFECT_H 1
3
4 #include "effect.h"
5 #include "effect_chain.h"
6
7 #define EXPANSION_CURVE_SIZE 256
8
9 class GammaExpansionEffect : public Effect {
10 public:
11         GammaExpansionEffect();
12         std::string output_fragment_shader();
13
14         virtual bool needs_linear_light() { return false; }
15         virtual bool needs_srgb_primaries() { return false; }
16
17 private:
18         GammaCurve source_curve;
19         float expansion_curve[EXPANSION_CURVE_SIZE];
20 };
21
22 #endif // !defined(_GAMMA_EXPANSION_EFFECT_H)