opengl es - Vuforia: add transparency to a region of video with a specific RGB value

Keywords:opengl  es 


I'm trying to obtain transparency for videos using OpenGL shaders. I was able to successfully remove green occurences in the video but my actual requirement is to only remove a particular shade of green but not all the shades of green.

I also understand that transparency can also be achieved through alpha masking. But I’m trying to achieve the same with just shaders. It would be great if someone could help to understand the pros and cons with both approaches.

1 Answer: 

As far as I know, alpha masking is more relevant when you need some more complex operations than this simple chroma-key effect you need. Although not specifically for alpha, you can look at this example for masking: masking.

In your case you just need to set the color (and sensitivity) you want to remove, and ignore that color. You can look here for some example that might help: Chroma Keying (transparent background)