#pragma once #include "effects/video_effect.hpp" namespace effector { // The pixel sort in motion: only pixels inside a window of brightness are // sorted, and the window sweeps from the dark end to the bright end and back, // so the sorted streaks spread over one part of the picture after another, // melt away and return. // // Which lines are sorted, and how their runs are cut, is drawn from // at.steady() and stays put; the window alone moves, there and back once a // cycle, so the clip loops without a jump. class SweepEffect : public VideoEffect { public: std::string name() const override { return "sweep"; } std::string title() const override { return "Sort sweep"; } std::string description() const override { return "Sorts runs of pixels as Pixel sort does, only within a window of brightness that " "sweeps from dark to bright and back."; } const std::vector& params() const override; protected: Image animate(Image input, const ParamValues& values, const Moment& at) const override; }; } // namespace effector