Blend modes are the blending options like layers have in Photoshop, this is in a 2D game.
So, there are some blend modes that are possible to do with plain glBlend and similar functions, but I had to use glTexEnvi while doing it and it's not available in OpenGL ES 2.0, and I would like to be able to have blend modes compatible with OpenGL ES 2.0 because I can easily turn it on WebGL compatible code using Emscripten.
Well, part of the magic of the glBlend functions is they happen without needing to "interrupt things" in the GL pipeline:
https://stackoverflow.com/a/17666532For using shaders to do it, like
https://www.shadertoy.com/view/XdS3RW , say I am drawing things in the reverse z-order they are on screen, so what's in the background is draw first, and then what's on top of it, and so on up to the layer with biggest z-index. Well, I can't seem to figure out, how do I get the screen in each step into a texture, so I can blend using a shader?