Add a blur effect plugin
Fills the canvas from one source, tiling it when it is smaller, then applies a separable box blur repeated `passes` times to approximate a gaussian. Params: radius, passes, direction and first_source, so the CLI flags and the GUI widgets come out of the ParamSpecs as usual. All random values (source index and crop offset) are drawn serially before the parallel pixel work, so a seed reproduces the image exactly; the box window clamps at both ends and the radius is clamped to the canvas so an oversized radius cannot read out of bounds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "core/registry.hpp"
|
||||
|
||||
#include "effects/blur.hpp"
|
||||
#include "effects/scanlines.hpp"
|
||||
|
||||
namespace effector {
|
||||
@@ -8,6 +9,7 @@ namespace effector {
|
||||
const std::vector<EffectPtr>& effects() {
|
||||
static const std::vector<EffectPtr> registry = {
|
||||
std::make_shared<ScanlinesEffect>(),
|
||||
std::make_shared<BlurEffect>(),
|
||||
};
|
||||
return registry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user