X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=gamma_expansion_effect.cpp;h=fdf34f58fe115b1c7bcd0cd9a95836606e843ba5;hb=a5f301c52c22bc29ade2a2b39f4ff3e4b10310a7;hp=cef1416ae5b8f7f5c7f9fc8c74641c11927412ef;hpb=93b0136eb2bd31043526b95dc3e920bc2ab880ee;p=movit diff --git a/gamma_expansion_effect.cpp b/gamma_expansion_effect.cpp index cef1416..fdf34f5 100644 --- a/gamma_expansion_effect.cpp +++ b/gamma_expansion_effect.cpp @@ -1,7 +1,24 @@ +#include + #include "gamma_expansion_effect.h" +#include "util.h" GammaExpansionEffect::GammaExpansionEffect() : source_curve(GAMMA_LINEAR) { register_int("source_curve", (int *)&source_curve); } + +std::string GammaExpansionEffect::output_glsl() +{ + switch (source_curve) { + case GAMMA_LINEAR: + return read_file("identity.glsl"); + case GAMMA_sRGB: + return read_file("gamma_expansion_effect_srgb.glsl"); + case GAMMA_REC_709: // and GAMMA_REC_601 + return read_file("gamma_expansion_effect_rec709.glsl"); + default: + assert(false); + } +}