This may seem like a trivial question, but let's say I have 2 textures with alpha, and want to combine them into one image. I want to essentially emulate Photoshop's Normal blend mode.
My first instinct is to alpha blend them over a buffer cleared to RGBA 0, 0, 0, 0.
However what actually happens is the result image is darker due to being blended on top of black pixels.
I ended up combining the colors with max() which luckily works in this situation due to the pixels not overlapping.
It seems like the correct thing to do is check if the pixels are empty at RGBA 0, 0, 0, 0. So if pixels are drawing over an empty pixel, explicitly take the color. However if the pixel wasn't empty, there'd be a standard alpha blend.
This seems hacky to me for some reason, since I'm doing this inside a shader and would have to essentially have a condition. And even then, my instincts tell me something won't be quite right when alpha blending a pixel over a non empty pixel that also is transparent.