+#include <assert.h>
+
#include "gamma_expansion_effect.h"
#include "util.h"
register_int("source_curve", (int *)&source_curve);
}
-std::string GammaExpansionEffect::output_glsl()
+std::string GammaExpansionEffect::output_fragment_shader()
{
- return read_file("todo.glsl");
+ switch (source_curve) {
+ case GAMMA_LINEAR:
+ return read_file("identity.frag");
+ case GAMMA_sRGB:
+ return read_file("gamma_expansion_effect_srgb.frag");
+ case GAMMA_REC_709: // and GAMMA_REC_601
+ return read_file("gamma_expansion_effect_rec709.frag");
+ default:
+ assert(false);
+ }
}