Cascade effects through a chain

renderChain runs a list of stages in order: stage 0 works on the loaded
sources, every later one on the output of the stage before it, so blur
after scanlines softens the scanlines rather than the photographs. The
effects themselves are untouched — none of them knows whether its input
came from disk. All stages share one Rng and run in sequence, so a seed
still reproduces the cascade byte for byte.

The sidebar grows an "Effect chain" list: add a stage from a menu built
from the registry, reorder it, remove it, and edit the selected stage's
params underneath. Each stage keeps its own values. The CLI takes the
same chain from repeated -e, with every flag going to the stage whose
effect declares it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Si
2026-09-18 15:21:29 +02:00
co-authored by Claude Opus 5
parent ee4b1038ac
commit 89985cb989
10 changed files with 409 additions and 75 deletions
+7 -1
View File
@@ -5,13 +5,14 @@
#include <string>
#include <vector>
#include "core/chain.hpp"
#include "core/params.hpp"
namespace effector {
struct Options {
std::vector<std::string> images;
std::string effect;
std::vector<std::string> effects; // one per cascade stage, in order
std::string output; // empty -> launch the interface
int width = 1920;
int height = 1080;
@@ -27,4 +28,9 @@ Options parseOptions(int argc, char** argv);
std::string usage(const char* programName);
// Turns the parsed names and flags into cascade stages: every flag goes to the
// stage whose effect declares it, so --strip-height and --radius can be given
// together for `-e scanlines -e blur`.
std::vector<ChainStage> buildChain(const Options& options);
} // namespace effector