#pragma once #include "effects/video_effect.hpp" namespace effector { // Film running through a projector: the grain is new on every frame, the // picture sways a little in the gate and its brightness flickers, and dust // and scratches pass over it. // // The sway is a sum of slow swings, each a whole number of times in the // clip, so it loops; grain, flicker and dust are drawn from at.fresh() and // are different on every frame, as they are on film. class FilmGateEffect : public VideoEffect { public: std::string name() const override { return "filmgate"; } std::string title() const override { return "Film gate"; } std::string description() const override { return "Film running through a projector: grain new on every frame, as Film grain draws " "it, a picture swaying in the gate, flicker, dust and scratches."; } const std::vector& params() const override; protected: Image animate(Image input, const ParamValues& values, const Moment& at) const override; }; } // namespace effector