0

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.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Techie
  • 1
  • 1

1 Answers1

0

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)

Community
  • 1
  • 1
yakobom
  • 2,681
  • 1
  • 25
  • 33