]> git.sesse.net Git - movit/blobdiff - effect.h
Add lift/gamma/gain GLSL code. Completely black output, due to lack of uniform setting.
[movit] / effect.h
index deeaae45264fddf57a3ffd5c5a57ee3da64b732a..c53a1556b28e500396387344f2dd6fd8aab28d27 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -4,6 +4,14 @@
 #include <map>
 #include <string>
 
+// Can alias on a float[3].
+struct RGBTriplet {
+       RGBTriplet(float r, float g, float b)
+               : r(r), g(g), b(b) {}
+
+       float r, g, b;
+};
+
 class Effect {
 public: 
        virtual bool needs_linear_light() { return true; }
@@ -11,6 +19,9 @@ public:
        virtual bool needs_many_samples() { return false; }
        virtual bool needs_mipmaps() { return false; }
 
+       virtual std::string output_convenience_uniforms();
+       virtual std::string output_glsl() = 0;
+
        // Neither of these take ownership.
        bool set_int(const std::string&, int value);
        bool set_float(const std::string &key, float value);