nleseul / obs-shaderfilter

OBS Studio filter for applying an arbitrary shader to a source.
The Unlicense
101 stars 119 forks source link

Getting previous (1 or more) frames? #13

Open Pomax opened 5 years ago

Pomax commented 5 years ago

Does this shader filter come with the ability to get the previous (original or post-processed) frame (or previous N frames) for things like time smoothing and noise reduction? Or, does it get run in a way that makes it possible to buffer a frame at each pass so that it stays available for the next pass? (if so, what's the right way to do that buffering?)

nleseul commented 5 years ago

Not currently supported... you'd need to capture each frame in the backend and store it in memory, and then decide how each old frame would be exposed to the shader on subsequent frames. I think it's probably a bit beyond the scope of this plugin to do this; the behavior is specific enough to your use cases that you'd probably do better writing a dedicated effect plugin to handle the memory management and configuration.

Pomax commented 5 years ago

noise reduction and temporal smoothing aren't really esoteric things, though, they're things I literally don't understand OBS doesn't come with out of the box... even 2000's virtualdub had those =(