Film grain's field moves to effects/grain_field.hpp so both share it; Film grain renders exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "effects/video_effect.hpp"
|
|
|
|
namespace effector {
|
|
|
|
// Film running through a projector: the grain is new on every frame, the
|
|
// picture sways a little in the gate and its brightness flickers, and dust
|
|
// and scratches pass over it.
|
|
//
|
|
// The sway is a sum of slow swings, each a whole number of times in the
|
|
// clip, so it loops; grain, flicker and dust are drawn from at.fresh() and
|
|
// are different on every frame, as they are on film.
|
|
class FilmGateEffect : public VideoEffect {
|
|
public:
|
|
std::string name() const override { return "filmgate"; }
|
|
std::string title() const override { return "Film gate"; }
|
|
std::string description() const override {
|
|
return "Film running through a projector: grain new on every frame, as Film grain draws "
|
|
"it, a picture swaying in the gate, flicker, dust and scratches.";
|
|
}
|
|
const std::vector<ParamSpec>& params() const override;
|
|
|
|
protected:
|
|
Image animate(Image input, const ParamValues& values, const Moment& at) const override;
|
|
};
|
|
|
|
} // namespace effector
|