I can use a pixel shader in WPF to remove a specific color, but there are alpha pixels layered over the background. I want to remove a background color, but keep alpha pixels.
For example, I have Image 1. It is a red rectangle with opacity 50% overlaid on a solid black background. I want to remove the black background so that the red rectangle stays alpha 50% and then I can overlay the resulted image on blue background like on Image 2-3 (left).
But by using a pixel shader to remove a specific color, I get Image 2-3 (right), which is not what I want.
- Is it possible?
- How is this process called?
- What pixel shader can I use to do it in WPF?