I am very very very very very very very new to shaders. What i am trying to do i simple copy a mask from one image to another.
My shader looks like this and i'm rendering to a quad;
vec4 basecolor = texture2D(texture0, uvVarying);
vec4 overcolor = texture2D(texture1, uvVarying);
//-- alpha blend
basecolor.a = overcolor.a;
//-- minus to erase
gl_FragColor = basecolor;
My problem is if i copy the mask from imageA to imageB and then imageB to imageC and ImageC to ImageD etc the alpha mask degrades.
This is my initial image
And this is the image after a few iterations (Notice how the edges are all fuzzy)