GPUImageVideoCamera with two targets
Fri, 06/15/2012 - 07:37
Hello,
I add two filters on a GPUImageVideoCamera then I mix the two filters with AlphaBlendFilter.
It works, but there is a lag between the two filters if I move the camera.
[videocamera addTarget: Filter1];
[videocamera addTarget: Filter2];
[Filter1 addTarget: AlphaBlendFilter];
[Filter2 addTarget: AlphaBlendFilter];
[AlphaBlendFilter addTarget: self.view];
How can I do for the two filters work with the same source image (GPUImageVideoCamera)?
Thank you for your help!
Mike
You're seeing double updating due to two filters feeding into a single blend. To prevent this, set the targetToIgnoreForUpdates property on the videocamera input to Filter1. This will cause the blend to only be executed when both Filter1 and Filter2 have been processed.