X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect.h;h=c53a1556b28e500396387344f2dd6fd8aab28d27;hp=deeaae45264fddf57a3ffd5c5a57ee3da64b732a;hb=430394b9790b9a7083aac549f607047499788710;hpb=e61807327b9a1f98f39dd5e1496254905f78e581 diff --git a/effect.h b/effect.h index deeaae4..c53a155 100644 --- a/effect.h +++ b/effect.h @@ -4,6 +4,14 @@ #include #include +// 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);