My code is drawing a background image and drawing some other images (particles) on top of that image. I want to make the particles have some blending effects, like darken, lighten, burn ... the same as Canvas globalcompositeoperation does . So in the fragment shader, i need to get the previous fragment color and blend it with the new color. But i could not find a way to do it.