Is there a way to specify either {GL_SRC_COLOR, xxx} , and {xxx, GL_DST_COLOR} so that the colors of the source and destination are multiplied, and also make sure that if GL_SRC_ALPHA = 0, then the result is {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA} ?
I create an overlay rectangle over my game world that starts transparent, but over time at night the overlay becomes a combination of blue and primary colors.
I tried {GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA} among others, as shown below. In both photographs, the left side is daytime without overlapping, and on the right side is labeled.
Night time right, overlay (SRC) at full alpha

The daytime overlay on the right is at 0 alpha.

The problem is that with an SRC alpha of zero, the target color doubles. I would like it to remain the same as without overlay, so that I can only adjust the opacity during the game and go into the night. Is there a way to do this or another way to achieve the same effect?
source share