#pragma once #include #include #include "core/effect.hpp" #include "core/image.hpp" #include "core/params.hpp" #include "core/rng.hpp" namespace effector { // One link of a cascade: an effect together with the values it runs with. struct ChainStage { EffectPtr effect; ParamValues values; // missing keys fall back to the effect's defaults }; // Renders the stages in order. The first one sees the loaded sources; every // later one sees the previous stage's output as its only source, so blur after // scanlines softens the scanlines rather than the photographs. // // All stages share one Rng and run strictly in sequence, so a seed still // reproduces the cascade byte for byte. Image renderChain(const std::vector& stages, const std::vector& sources, int width, int height, Rng& rng); // "Scanlines → Blur", for window titles and status lines. std::string chainTitle(const std::vector& stages); // "scanlines-blur", for file names. std::string chainSlug(const std::vector& stages); } // namespace effector