How to do multi-pass filter shaders?

khaver

Member
The OBS docs mention multi-pass shaders but don't give any examples, only that modern GPU's don't need to do multi-passes. In my case I need to do a multi-pass. I need to blur a mask created from the source video before it's used to affect the source video. Here's the comment in the docs:

Effect Techniques​

Techniques are used to define the primary vertex/pixel shader entry functions per pass. One technique can have multiple passes or custom pass setup.

(Author’s note: These days, multiple passes aren’t really needed; GPUs are powerful enough to where you can perform all actions in the same shader. Named passes can be useful for custom draw setups, but even then you can just make it a separate technique. For that reason, it’s best to just ignore the extra pass functionality.)


Thanks.
 

upgradeQ

Member
Have you found a solution to this? I am trying to port shadertoys multiple buffer shaders to Lua + OBS Studio shader language, I found that multiple passes were rejected in this PR. https://github.com/obsproject/obs-studio/pull/1331
Also there is Pixel art shader by @bfxdev but it seems to be using multiple techniques instead of passes, I've tried stacking passes, like pass p1, pass p2, in this shader but it doesn't seem to be working.
Multipass or not?(another source)
 
Top