#pragma once #include "core/effect.hpp" namespace effector { // Softens its input with a separable box blur, repeated a few times to // approximate a gaussian. It needs no source images of its own: given none it // blurs an empty canvas, which is what makes it usable as a pure filter stage. class BlurEffect : public Effect { public: std::string name() const override { return "blur"; } std::string title() const override { return "Blur"; } std::string description() const override { return "Softens its input with a repeated box blur, horizontally, vertically or both; " "with sources loaded it fills the canvas from a randomly chosen one first."; } const std::vector& params() const override; bool needsSources() const override { return false; } Image render(const std::vector& sources, int width, int height, Rng& rng, const ParamValues& values) const override; }; } // namespace effector