I am trying to figure out how to set the alpha of a textured square that I draw depending on the color. I am using a picture of a red Alabama A with a white background. I want to be able to toggle it to take out the red and show through the A and toggle it to take out the white and leave the A. I have 2 textured squares. One is the background, So I thought I couldn't do this in the frag shader because it would do it to both images right? In my main js file I need to be able to toggle the "chroma key" from red to white when I click on the toggle HTML button.
So, how do I change the alpha of a textured square based on pixel, if there are only 4 true points with colors? Or 6 points with 2 being used twice (2 triangles).
This is only in 2-D by the way.