#pragma once #include "core/effect.hpp" namespace effector { // Knocks the red, green and blue planes out of register, either the whole image // at once or band by band, each band with offsets of its own. // In a video the channels do not sit still: they sway, shake from frame to // frame, and a tracking bar rolls down the picture as on a worn tape or an old // tube. A still picture is rendered exactly as it always was. // A pure transform: it needs no source images, and leading a chain with // sources loaded it starts from a crop of a randomly chosen one. class ChannelSplitEffect : public Effect { public: std::string name() const override { return "channelsplit"; } std::string title() const override { return "Channel split"; } std::string description() const override { return "Knocks the red, green and blue planes out of register, over the whole image or " "band by band."; } const std::vector& params() const override; bool needsSources() const override { return false; } bool animated(const ParamValues& values) const override; Image render(const std::vector& sources, int width, int height, Rng& rng, const ParamValues& values) const override; Image renderFrame(const std::vector& sources, int width, int height, Rng& rng, const ParamValues& values, const FrameTime& frame) const override; }; } // namespace effector